Property | Type | Description | |
---|---|---|---|
$cache | The cache object if the cache is wanted, else false | ||
$loader | The loaderProvider for Vars supplies the file loaders and the extensions that are supported | ||
$variables | The variable provider |
Method | Description | |
---|---|---|
__construct ( string | array $resource, array $options = [] ) | Creates a new instance of Vars | |
addResource ( string $resource ) : integer | Adds a resource to $this->resources | |
getCache ( ) : |
Returns the CacheProvider if set | |
getGlobals ( ) : array | Returns the imported resources | |
getResource ( string $resource ) : |
Searches the resource stack for a certain resource | |
getResources ( ) : array | Returns the imported resources | |
pathsLoadedCheck ( string $resource ) | Checks if the base and cache paths have been set, if not\ set then will use the $resource as the base path | |
resourceImported ( |
Tests to see if the resource has been imported already -- this is to avoid getting into a infinite loop | |
updateResource ( |
Updates the string resource with the FileResource |
Method | Description | |
---|---|---|
loadFromCache ( ) | Loads the cached file into the current class | |
makeCache ( array $options, array | string $resource ) | Makes the CacheProvider with the options | |
makeLoader ( array $options ) | Makes the LoaderProvider with the options | |
makePaths ( array $options ) | Sets the base path if the options have been set and the cache path if the cache path has not been set but the base path has | |
makeVariables ( array | null $options ) | Sets the replacement variables if the option has been set | |
mergeGlobals ( array $content, array $options ) : array | Gets the _globals from the file and merges them if merge_globals is true | |
parseOptions ( array $options ) : array | Parses the options so Vars can use them |
public addResource ( string $resource ) : integer | ||
$resource | string | Resource to add to the stack |
return | integer | The position of the added resource |
public getCache ( ) : |
||
return | The CacheProvider |
public getGlobals ( ) : array | ||
return | array | The Vars imported resources |
public getResource ( string $resource ) : |
||
$resource | string | The resource to search for |
return | Returns the resource if found |
public getResources ( ) : array | ||
return | array | The Vars imported resources |
public pathsLoadedCheck ( string $resource ) | ||
$resource | string | The resource to use to set the paths if they haven't been set |
public resourceImported ( |
||
$resource | Resource to check | |
return | boolean | Has resource already been imported |
public updateResource ( |
||
$resource | The FileResource to add | |
$pos | integer | The position of the string resource |
return |
public CacheProvider,M1\Vars\Cache $cache | ||
return |
public LoaderProvider,M1\Vars\Loader $loader | ||
return |