ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
A reference to an asset in the asset manager. More...
Public Member Functions | |
__construct (AssetManager $am, $name) | |
__clone () | |
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 time the current asset was last modified. More... | |
getVars () | |
Returns an array of variable names for this asset. More... | |
getValues () | |
Returns the current values for this asset. More... | |
setValues (array $values) | |
Sets the values for the asset's variables. More... | |
Private Member Functions | |
callAsset ($method, $arguments=array()) | |
flushFilters () | |
resolve () | |
Private Attributes | |
$am | |
$name | |
$filters = array() | |
$clone = false | |
$asset | |
A reference to an asset in the asset manager.
Definition at line 22 of file AssetReference.php.
Assetic\Asset\AssetReference::__construct | ( | AssetManager | $am, |
$name | |||
) |
Definition at line 30 of file AssetReference.php.
References Assetic\Asset\AssetReference\$am, and Assetic\Asset\AssetReference\$name.
Assetic\Asset\AssetReference::__clone | ( | ) |
|
private |
Definition at line 134 of file AssetReference.php.
References Assetic\Asset\AssetReference\$asset, array, and Assetic\Asset\AssetReference\resolve().
Referenced by Assetic\Asset\AssetReference\clearFilters(), Assetic\Asset\AssetReference\dump(), Assetic\Asset\AssetReference\getContent(), Assetic\Asset\AssetReference\getFilters(), Assetic\Asset\AssetReference\getLastModified(), Assetic\Asset\AssetReference\getSourceDirectory(), Assetic\Asset\AssetReference\getSourcePath(), Assetic\Asset\AssetReference\getSourceRoot(), Assetic\Asset\AssetReference\getTargetPath(), Assetic\Asset\AssetReference\getValues(), Assetic\Asset\AssetReference\getVars(), Assetic\Asset\AssetReference\load(), Assetic\Asset\AssetReference\setContent(), Assetic\Asset\AssetReference\setTargetPath(), and Assetic\Asset\AssetReference\setValues().
Assetic\Asset\AssetReference::clearFilters | ( | ) |
Clears all filters from the current asset.
Implements Assetic\Asset\AssetInterface.
Definition at line 57 of file AssetReference.php.
References array, and Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::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 70 of file AssetReference.php.
References array, Assetic\Asset\AssetReference\callAsset(), and Assetic\Asset\AssetReference\flushFilters().
Assetic\Asset\AssetReference::ensureFilter | ( | FilterInterface | $filter | ) |
Ensures the current asset includes the supplied filter.
FilterInterface | $filter | A filter |
Implements Assetic\Asset\AssetInterface.
Definition at line 45 of file AssetReference.php.
|
private |
Definition at line 141 of file AssetReference.php.
References Assetic\Asset\AssetReference\$asset, and Assetic\Asset\AssetReference\resolve().
Referenced by Assetic\Asset\AssetReference\dump(), Assetic\Asset\AssetReference\getFilters(), and Assetic\Asset\AssetReference\load().
Assetic\Asset\AssetReference::getContent | ( | ) |
Returns the loaded content of the current asset.
Implements Assetic\Asset\AssetInterface.
Definition at line 77 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getFilters | ( | ) |
Returns an array of filters currently applied.
Implements Assetic\Asset\AssetInterface.
Definition at line 50 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset(), and Assetic\Asset\AssetReference\flushFilters().
Assetic\Asset\AssetReference::getLastModified | ( | ) |
Returns the time the current asset was last modified.
Implements Assetic\Asset\AssetInterface.
Definition at line 112 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getSourceDirectory | ( | ) |
Returns the asset's source directory.
The source directory is the directory the asset was located in and can be used to resolve references relative to an asset.
Implements Assetic\Asset\AssetInterface.
Definition at line 97 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getSourcePath | ( | ) |
Returns the relative path for the source asset.
This value can be combined with the asset's source root (if both are non-null) to get something compatible with file_get_contents().
For example:
Implements Assetic\Asset\AssetInterface.
Definition at line 92 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getSourceRoot | ( | ) |
Returns an absolute path or URL to the source asset's root directory.
This value should be an absolute path to a directory in the filesystem, an absolute URL with no path, or null.
For example:
Implements Assetic\Asset\AssetInterface.
Definition at line 87 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getTargetPath | ( | ) |
Returns the URL for the current asset.
Implements Assetic\Asset\AssetInterface.
Definition at line 102 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getValues | ( | ) |
Returns the current values for this asset.
Implements Assetic\Asset\AssetInterface.
Definition at line 122 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::getVars | ( | ) |
Returns an array of variable names for this asset.
Implements Assetic\Asset\AssetInterface.
Definition at line 117 of file AssetReference.php.
References Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::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 63 of file AssetReference.php.
References array, Assetic\Asset\AssetReference\callAsset(), and Assetic\Asset\AssetReference\flushFilters().
|
private |
Definition at line 150 of file AssetReference.php.
References Assetic\Asset\AssetReference\$asset.
Referenced by Assetic\Asset\AssetReference\callAsset(), and Assetic\Asset\AssetReference\flushFilters().
Assetic\Asset\AssetReference::setContent | ( | $content | ) |
Sets the content of the current asset.
Filters can use this method to change the content of the asset.
string | $content | The asset content |
Implements Assetic\Asset\AssetInterface.
Definition at line 82 of file AssetReference.php.
References array, and Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::setTargetPath | ( | $targetPath | ) |
Sets the URL for the current asset.
string | $targetPath | A web URL where the asset will be dumped |
Implements Assetic\Asset\AssetInterface.
Definition at line 107 of file AssetReference.php.
References array, and Assetic\Asset\AssetReference\callAsset().
Assetic\Asset\AssetReference::setValues | ( | array | $values | ) |
Sets the values for the asset's variables.
array | $values |
Implements Assetic\Asset\AssetInterface.
Definition at line 127 of file AssetReference.php.
References array, and Assetic\Asset\AssetReference\callAsset().
|
private |
Definition at line 24 of file AssetReference.php.
Referenced by Assetic\Asset\AssetReference\__construct().
|
private |
Definition at line 28 of file AssetReference.php.
Referenced by Assetic\Asset\AssetReference\__clone(), Assetic\Asset\AssetReference\callAsset(), Assetic\Asset\AssetReference\flushFilters(), and Assetic\Asset\AssetReference\resolve().
|
private |
Definition at line 27 of file AssetReference.php.
|
private |
Definition at line 26 of file AssetReference.php.
|
private |
Definition at line 25 of file AssetReference.php.
Referenced by Assetic\Asset\AssetReference\__construct().