Elgg  Version 1.11
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\ViewsService Class Reference

Public Member Functions

 __construct (\Elgg\PluginHooksService $hooks,\Elgg\Logger $logger)
 Constructor. More...
 
 autoregisterViews ($view_base, $folder, $base_location_path, $viewtype)
 private More...
 
 getViewLocation ($view, $viewtype= '')
 private More...
 
 setViewLocation ($view, $location, $viewtype= '')
 private More...
 
 registerViewtypeFallback ($viewtype)
 private More...
 
 doesViewtypeFallback ($viewtype)
 private More...
 
 renderDeprecatedView ($view, array $vars, $suggestion, $version)
 Display a view with a deprecation notice. More...
 
 renderView ($view, array $vars=array(), $bypass=false, $viewtype= '', $issue_missing_notice=true)
 private More...
 
 viewExists ($view, $viewtype= '', $recurse=true)
 private More...
 
 extendView ($view, $view_extension, $priority=501, $viewtype= '')
 private More...
 
 unextendView ($view, $view_extension)
 private More...
 
 registerCacheableView ($view)
 private More...
 
 isCacheableView ($view)
 private More...
 
 registerPluginViews ($path, &$failed_dir= '')
 Register a plugin's views. More...
 
 getOverriddenLocations ()
 Get views overridden by setViewLocation() calls. More...
 
 setOverriddenLocations (array $locations)
 Set views overridden by setViewLocation() calls. More...
 

Protected Member Functions

 getUserWrapper ()
 Get the user object in a wrapper. More...
 
 fileExists ($path)
 Wrapper for file_exists() that caches false results (the stat cache only caches true results). More...
 

Protected Attributes

 $config_wrapper
 
 $site_url_wrapper
 
 $user_wrapper
 
 $user_wrapped
 
 $file_exists_cache = array()
 

Detailed Description

Definition at line 18 of file ViewsService.php.

Constructor & Destructor Documentation

Elgg\ViewsService::__construct ( \Elgg\PluginHooksService  $hooks,
\Elgg\Logger  $logger 
)

Constructor.

Parameters
\Elgg\PluginHooksService$hooksThe hooks service
\Elgg\Logger$loggerLogger

Definition at line 59 of file ViewsService.php.

Member Function Documentation

Elgg\ViewsService::autoregisterViews (   $view_base,
  $folder,
  $base_location_path,
  $viewtype 
)

private

Definition at line 88 of file ViewsService.php.

Elgg\ViewsService::doesViewtypeFallback (   $viewtype)

private

Definition at line 183 of file ViewsService.php.

Elgg\ViewsService::extendView (   $view,
  $view_extension,
  $priority = 501,
  $viewtype = '' 
)

private

Definition at line 456 of file ViewsService.php.

Elgg\ViewsService::fileExists (   $path)
protected

Wrapper for file_exists() that caches false results (the stat cache only caches true results).

This saves us from many unneeded file stat calls when a common view uses a fallback.

Parameters
string$pathPath to the file
Returns
bool

Definition at line 365 of file ViewsService.php.

Elgg\ViewsService::getOverriddenLocations ( )

Get views overridden by setViewLocation() calls.

Returns
array

private

Definition at line 609 of file ViewsService.php.

Elgg\ViewsService::getUserWrapper ( )
protected

Get the user object in a wrapper.

Returns
|null

Definition at line 71 of file ViewsService.php.

Elgg\ViewsService::getViewLocation (   $view,
  $viewtype = '' 
)

private

Definition at line 116 of file ViewsService.php.

Elgg\ViewsService::isCacheableView (   $view)

private

Definition at line 528 of file ViewsService.php.

Elgg\ViewsService::registerCacheableView (   $view)

private

Definition at line 511 of file ViewsService.php.

Elgg\ViewsService::registerPluginViews (   $path,
$failed_dir = '' 
)

Register a plugin's views.

Parameters
string$pathBase path of the plugin
string$failed_dirThis var is set to the failed directory if registration fails
Returns
bool

private

Definition at line 571 of file ViewsService.php.

Elgg\ViewsService::registerViewtypeFallback (   $viewtype)

private

Definition at line 166 of file ViewsService.php.

Elgg\ViewsService::renderDeprecatedView (   $view,
array  $vars,
  $suggestion,
  $version 
)

Display a view with a deprecation notice.

No missing view NOTICE is logged

See also
elgg_view()
Parameters
string$viewThe name and location of the view to use
array$varsVariables to pass to the view
string$suggestionSuggestion with the deprecation message
string$versionHuman-readable release version: 1.7, 1.8, ...
Returns
string The parsed view private

Definition at line 206 of file ViewsService.php.

Elgg\ViewsService::renderView (   $view,
array  $vars = array(),
  $bypass = false,
  $viewtype = '',
  $issue_missing_notice = true 
)

private

Definition at line 217 of file ViewsService.php.

Elgg\ViewsService::setOverriddenLocations ( array  $locations)

Set views overridden by setViewLocation() calls.

Parameters
array$locations
Returns
void

private

Definition at line 621 of file ViewsService.php.

Elgg\ViewsService::setViewLocation (   $view,
  $location,
  $viewtype = '' 
)

private

Definition at line 137 of file ViewsService.php.

Elgg\ViewsService::unextendView (   $view,
  $view_extension 
)

private

Definition at line 483 of file ViewsService.php.

Elgg\ViewsService::viewExists (   $view,
  $viewtype = '',
  $recurse = true 
)

private

Definition at line 407 of file ViewsService.php.

Member Data Documentation

Elgg\ViewsService::$config_wrapper
protected

Definition at line 20 of file ViewsService.php.

Elgg\ViewsService::$file_exists_cache = array()
protected

Definition at line 29 of file ViewsService.php.

Elgg\ViewsService::$site_url_wrapper
protected

Definition at line 21 of file ViewsService.php.

Elgg\ViewsService::$user_wrapped
protected

Definition at line 23 of file ViewsService.php.

Elgg\ViewsService::$user_wrapper
protected

Definition at line 22 of file ViewsService.php.


The documentation for this class was generated from the following file: