47 $this->filters[] = $filter;
59 $this->filters =
array();
138 return call_user_func_array(
array(
$asset, $method), $arguments);
145 while ($filter = array_shift($this->filters)) {
146 $asset->ensureFilter($filter);
156 $asset = $this->am->get($this->name);
A reference to an asset in the asset manager.
getSourceRoot()
Returns an absolute path or URL to the source asset's root directory.
getContent()
Returns the loaded content of the current asset.
callAsset($method, $arguments=array())
clearFilters()
Clears all filters from the current asset.
__construct(AssetManager $am, $name)
setTargetPath($targetPath)
Sets the URL for the current asset.
getLastModified()
Returns the time the current asset was last modified.
getSourceDirectory()
Returns the asset's source directory.
getTargetPath()
Returns the URL for the current asset.
setContent($content)
Sets the content of the current asset.
dump(FilterInterface $additionalFilter=null)
Applies dump filters and returns the asset as a string.
getVars()
Returns an array of variable names for this asset.
A filter manipulates an asset at load and dump.
setValues(array $values)
Sets the values for the asset's variables.
ensureFilter(FilterInterface $filter)
Ensures the current asset includes the supplied filter.
getFilters()
Returns an array of filters currently applied.
An asset has a mutable URL and content and can be loaded and dumped.
Create styles array
The data for the language used.
getSourcePath()
Returns the relative path for the source asset.
load(FilterInterface $additionalFilter=null)
Loads the asset into memory and applies load filters.
getValues()
Returns the current values for this asset.