ResourceLocator¶
-
class
OC\Template\ResourceLocator¶ Source: lib/private/Template/ResourceLocator.php#33
Properties¶
-
protected static property
OC\Template\ResourceLocator::$theme¶ Source: lib/private/Template/ResourceLocator.php#34
-
protected static property
OC\Template\ResourceLocator::$mapping¶ Source: lib/private/Template/ResourceLocator.php#36
-
protected static property
OC\Template\ResourceLocator::$serverroot¶ Source: lib/private/Template/ResourceLocator.php#37
-
protected static property
OC\Template\ResourceLocator::$thirdpartyroot¶ Source: lib/private/Template/ResourceLocator.php#38
-
protected static property
OC\Template\ResourceLocator::$webroot¶ Source: lib/private/Template/ResourceLocator.php#39
-
protected static property
OC\Template\ResourceLocator::$resources¶ Source: lib/private/Template/ResourceLocator.php#41
-
protected static property
OC\Template\ResourceLocator::$logger¶ Source: lib/private/Template/ResourceLocator.php#44 Type: \OCP\ILogger
Methods¶
-
public
OC\Template\ResourceLocator::__construct($logger, $theme, $core_map, $party_map)¶ Source: Parameters: - $logger (
OCP\ILogger) - $theme (string)
- $core_map (array)
- $party_map (array)
- $logger (
-
public abstract
OC\Template\ResourceLocator::doFind($resource)¶ Source: Parameters: - $resource (string)
-
public abstract
OC\Template\ResourceLocator::doFindTheme($resource)¶ Source: Parameters: - $resource (string)
-
public
OC\Template\ResourceLocator::find($resources)¶ - Finds the resources and adds them to the list
Source: Parameters: - $resources (array)
-
protected
OC\Template\ResourceLocator::appendIfExist($root, $file, $webRoot=null)¶ - append the $file resource if exist at $root
Source: Parameters: - $root (string) path to check
- $file (string) the filename
- $webRoot (string | null) base for path, default map $root to $webRoot
Returns: bool True if the resource was found, false otherwise
-
protected
OC\Template\ResourceLocator::findWebRoot($root)¶ - Attempt to find the webRoottraverse the potential web roots upwards in the pathexample:- root: /srv/www/apps/myapp- available mappings: [‘/srv/www’]First we check if a mapping for /srv/www/apps/myapp is available,then /srv/www/apps, /srv/www/apps, /srv/www, ... until we find avalid web root
Source: Parameters: - $root (string)
Returns: string | null The web root or null on failure
-
protected
OC\Template\ResourceLocator::append($root, $file, $webRoot=null, $throw=true)¶ - append the $file resource at $root
Source: Parameters: - $root (string) path to check
- $file (string) the filename
- $webRoot (string | null) base for path, default map $root to $webRoot
- $throw (bool) Throw an exception, when the route does not exist
Throws: \OC\Template\ResourceNotFoundExceptionOnly thrown when $throw is true and the resource is missing
-
public
OC\Template\ResourceLocator::getResources()¶ - Returns the list of all resources that should be loaded
Source: lib/private/Template/ResourceLocator.php#199 Returns: array