ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
A collection of assets loaded by glob. More...
Public Member Functions | |
__construct ($globs, $filters=array(), $root=null, array $vars=array()) | |
Constructor. More... | |
all () | |
Returns all child assets. More... | |
load (FilterInterface $additionalFilter=null) | |
Loads the asset into memory and applies load filters. More... | |
dump (FilterInterface $additionalFilter=null) | |
Applies dump filters and returns the asset as a string. More... | |
getLastModified () | |
Returns the time the current asset was last modified. More... | |
getIterator () | |
setValues (array $values) | |
Sets the values for the asset's variables. More... | |
![]() | |
__construct ($assets=array(), $filters=array(), $sourceRoot=null, array $vars=array()) | |
Constructor. More... | |
__clone () | |
all () | |
Returns all child assets. More... | |
add (AssetInterface $asset) | |
Adds an asset to the current collection. More... | |
removeLeaf (AssetInterface $needle, $graceful=false) | |
Removes a leaf. More... | |
replaceLeaf (AssetInterface $needle, AssetInterface $replacement, $graceful=false) | |
Replaces an existing leaf with a new one. More... | |
ensureFilter (FilterInterface $filter) | |
Ensures the current asset includes the supplied filter. More... | |
getFilters () | |
Returns an array of filters currently applied. More... | |
clearFilters () | |
Clears all filters from the current asset. More... | |
load (FilterInterface $additionalFilter=null) | |
Loads the asset into memory and applies load filters. More... | |
dump (FilterInterface $additionalFilter=null) | |
Applies dump filters and returns the asset as a string. More... | |
getContent () | |
Returns the loaded content of the current asset. More... | |
setContent ($content) | |
Sets the content of the current asset. More... | |
getSourceRoot () | |
Returns an absolute path or URL to the source asset's root directory. More... | |
getSourcePath () | |
Returns the relative path for the source asset. More... | |
getSourceDirectory () | |
Returns the asset's source directory. More... | |
getTargetPath () | |
Returns the URL for the current asset. More... | |
setTargetPath ($targetPath) | |
Sets the URL for the current asset. More... | |
getLastModified () | |
Returns the highest last-modified value of all assets in the current collection. More... | |
getIterator () | |
Returns an iterator for looping recursively over unique leaves. More... | |
getVars () | |
Returns an array of variable names for this asset. More... | |
setValues (array $values) | |
Sets the values for the asset's variables. More... | |
getValues () | |
Returns the current values for this asset. More... | |
Private Member Functions | |
initialize () | |
Initializes the collection based on the glob(s) passed in. More... | |
Private Attributes | |
$globs | |
$initialized | |
A collection of assets loaded by glob.
Definition at line 22 of file GlobAsset.php.
Assetic\Asset\GlobAsset::__construct | ( | $globs, | |
$filters = array() , |
|||
$root = null , |
|||
array | $vars = array() |
||
) |
Constructor.
string | array | $globs | A single glob path or array of paths |
array | $filters | An array of filters |
string | $root | The root directory |
array | $vars |
Definition at line 35 of file GlobAsset.php.
References Assetic\Asset\AssetCollection\$filters, Assetic\Asset\GlobAsset\$globs, Assetic\Asset\AssetCollection\$vars, and array.
Assetic\Asset\GlobAsset::all | ( | ) |
Returns all child assets.
Implements Assetic\Asset\AssetCollectionInterface.
Definition at line 43 of file GlobAsset.php.
References Assetic\Asset\GlobAsset\initialize().
Assetic\Asset\GlobAsset::dump | ( | FilterInterface | $additionalFilter = null | ) |
Applies dump filters and returns the asset as a string.
You may provide an additional filter to apply during dump.
Dumping an asset should not change its state.
If the current asset has not been loaded yet, it should be automatically loaded at this time.
FilterInterface | $additionalFilter | An additional filter |
Implements Assetic\Asset\AssetInterface.
Definition at line 61 of file GlobAsset.php.
References Assetic\Asset\GlobAsset\initialize().
Assetic\Asset\GlobAsset::getIterator | ( | ) |
Definition at line 79 of file GlobAsset.php.
References Assetic\Asset\GlobAsset\initialize().
Assetic\Asset\GlobAsset::getLastModified | ( | ) |
Returns the time the current asset was last modified.
Implements Assetic\Asset\AssetInterface.
Definition at line 70 of file GlobAsset.php.
References Assetic\Asset\GlobAsset\initialize().
|
private |
Initializes the collection based on the glob(s) passed in.
Definition at line 97 of file GlobAsset.php.
References $path, Assetic\Asset\AssetCollection\add(), array, Assetic\Asset\AssetCollection\getSourceRoot(), Assetic\Asset\AssetCollection\getValues(), Assetic\Asset\AssetCollection\getVars(), and Assetic\Util\VarUtils\resolve().
Referenced by Assetic\Asset\GlobAsset\all(), Assetic\Asset\GlobAsset\dump(), Assetic\Asset\GlobAsset\getIterator(), Assetic\Asset\GlobAsset\getLastModified(), and Assetic\Asset\GlobAsset\load().
Assetic\Asset\GlobAsset::load | ( | FilterInterface | $additionalFilter = null | ) |
Loads the asset into memory and applies load filters.
You may provide an additional filter to apply during load.
FilterInterface | $additionalFilter | An additional filter |
Implements Assetic\Asset\AssetInterface.
Definition at line 52 of file GlobAsset.php.
References Assetic\Asset\GlobAsset\initialize().
Assetic\Asset\GlobAsset::setValues | ( | array | $values | ) |
Sets the values for the asset's variables.
array | $values |
Implements Assetic\Asset\AssetInterface.
Definition at line 88 of file GlobAsset.php.
|
private |
Definition at line 24 of file GlobAsset.php.
Referenced by Assetic\Asset\GlobAsset\__construct().
|
private |
Definition at line 25 of file GlobAsset.php.