ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
An asset has a mutable URL and content and can be loaded and dumped. More...
Public Member Functions | |
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... | |
setValues (array $values) | |
Sets the values for the asset's variables. More... | |
getValues () | |
Returns the current values for this asset. More... | |
An asset has a mutable URL and content and can be loaded and dumped.
Definition at line 21 of file AssetInterface.php.
Assetic\Asset\AssetInterface::clearFilters | ( | ) |
Clears all filters from the current asset.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Assetic\Asset\AssetInterface::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 |
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, Assetic\Asset\AssetCache, and Assetic\Asset\GlobAsset.
Referenced by Assetic\AssetWriter\writeAsset().
Assetic\Asset\AssetInterface::ensureFilter | ( | FilterInterface | $filter | ) |
Ensures the current asset includes the supplied filter.
FilterInterface | $filter | A filter |
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Factory\Worker\EnsureFilterWorker\process().
Assetic\Asset\AssetInterface::getContent | ( | ) |
Returns the loaded content of the current asset.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Filter\Yui\CssCompressorFilter\filterDump(), Assetic\Filter\CssRewriteFilter\filterDump(), Assetic\Filter\JSMinPlusFilter\filterDump(), Assetic\Filter\JSMinFilter\filterDump(), Assetic\Filter\MinifyCssCompressorFilter\filterDump(), Assetic\Filter\GoogleClosure\CompilerApiFilter\filterDump(), Assetic\Filter\CssCacheBustingFilter\filterDump(), Assetic\Filter\GoogleClosure\CompilerJarFilter\filterDump(), Assetic\Filter\SeparatorFilter\filterDump(), Assetic\Filter\Yui\JsCompressorFilter\filterDump(), Assetic\Filter\OptiPngFilter\filterDump(), Assetic\Filter\PackerFilter\filterDump(), Assetic\Filter\JpegoptimFilter\filterDump(), Assetic\Filter\CssMinFilter\filterDump(), Assetic\Filter\JSqueezeFilter\filterDump(), Assetic\Filter\JpegtranFilter\filterDump(), Assetic\Filter\UglifyJs2Filter\filterDump(), Assetic\Filter\UglifyCssFilter\filterDump(), Assetic\Filter\CssEmbedFilter\filterDump(), Assetic\Filter\PngoutFilter\filterDump(), Assetic\Filter\UglifyJsFilter\filterDump(), Assetic\Filter\CleanCssFilter\filterDump(), Assetic\Filter\ReactJsxFilter\filterLoad(), Assetic\Filter\DartFilter\filterLoad(), Assetic\Filter\PhpCssEmbedFilter\filterLoad(), Assetic\Filter\TypeScriptFilter\filterLoad(), Assetic\Filter\EmberPrecompileFilter\filterLoad(), Assetic\Filter\PackagerFilter\filterLoad(), Assetic\Filter\CssImportFilter\filterLoad(), Assetic\Filter\RooleFilter\filterLoad(), Assetic\Filter\HandlebarsFilter\filterLoad(), Assetic\Filter\CoffeeScriptFilter\filterLoad(), Assetic\Filter\AutoprefixerFilter\filterLoad(), Assetic\Filter\SprocketsFilter\filterLoad(), Assetic\Filter\StylusFilter\filterLoad(), Assetic\Filter\GssFilter\filterLoad(), Assetic\Filter\LessphpFilter\filterLoad(), Assetic\Filter\ScssphpFilter\filterLoad(), Assetic\Filter\LessFilter\filterLoad(), Assetic\Filter\Sass\SassFilter\filterLoad(), and Assetic\Filter\CompassFilter\filterLoad().
Assetic\Asset\AssetInterface::getFilters | ( | ) |
Returns an array of filters currently applied.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Asset\Iterator\AssetCollectionIterator\__construct(), and Assetic\Asset\AssetCache\getCacheKey().
Assetic\Asset\AssetInterface::getLastModified | ( | ) |
Returns the time the current asset was last modified.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\AssetReference, Assetic\Asset\AssetCache, Assetic\Asset\GlobAsset, Assetic\Asset\FileAsset, Assetic\Asset\HttpAsset, and Assetic\Asset\StringAsset.
Referenced by Assetic\Asset\AssetCache\getCacheKey().
Assetic\Asset\AssetInterface::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.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Filter\CssMinFilter\filterDump(), Assetic\Filter\CssEmbedFilter\filterDump(), Assetic\Filter\PhpCssEmbedFilter\filterLoad(), Assetic\Filter\StylusFilter\filterLoad(), Assetic\Filter\LessphpFilter\filterLoad(), Assetic\Filter\ScssphpFilter\filterLoad(), Assetic\Filter\LessFilter\filterLoad(), Assetic\Filter\Sass\SassFilter\filterLoad(), and Assetic\Filter\CompassFilter\filterLoad().
Assetic\Asset\AssetInterface::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:
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Filter\CssRewriteFilter\filterDump(), Assetic\Filter\TypeScriptFilter\filterLoad(), Assetic\Filter\EmberPrecompileFilter\filterLoad(), Assetic\Filter\CssImportFilter\filterLoad(), Assetic\Filter\HandlebarsFilter\filterLoad(), Assetic\Filter\StylusFilter\filterLoad(), Assetic\Filter\LessFilter\filterLoad(), Assetic\Filter\Sass\SassFilter\filterLoad(), Assetic\Filter\CompassFilter\filterLoad(), Assetic\Asset\AssetCache\getCacheKey(), and Assetic\Factory\Worker\EnsureFilterWorker\process().
Assetic\Asset\AssetInterface::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:
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Filter\CssRewriteFilter\filterDump(), Assetic\Filter\CssImportFilter\filterLoad(), and Assetic\Asset\AssetCache\getCacheKey().
Assetic\Asset\AssetInterface::getTargetPath | ( | ) |
Returns the URL for the current asset.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Asset\Iterator\AssetCollectionIterator\__construct(), Assetic\Extension\Twig\AsseticNode\compileAssetUrl(), Assetic\Filter\CssRewriteFilter\filterDump(), Assetic\Asset\AssetCache\getCacheKey(), Assetic\Factory\Worker\CacheBustingWorker\process(), Assetic\Factory\Worker\EnsureFilterWorker\process(), and Assetic\AssetWriter\writeAsset().
Assetic\Asset\AssetInterface::getValues | ( | ) |
Returns the current values for this asset.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetCache, and Assetic\Asset\AssetReference.
Referenced by Assetic\Asset\AssetCache\getCacheKey(), and Assetic\AssetWriter\writeAsset().
Assetic\Asset\AssetInterface::getVars | ( | ) |
Returns an array of variable names for this asset.
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Asset\Iterator\AssetCollectionIterator\__construct(), Assetic\Extension\Twig\AsseticNode\compileAsset(), Assetic\Extension\Twig\AsseticNode\compileAssetUrl(), and Assetic\AssetWriter\writeAsset().
Assetic\Asset\AssetInterface::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 |
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\AssetReference, Assetic\Asset\FileAsset, Assetic\Asset\HttpAsset, Assetic\Asset\GlobAsset, Assetic\Asset\AssetCache, and Assetic\Asset\StringAsset.
Referenced by Assetic\Asset\BaseAsset\dump().
Assetic\Asset\AssetInterface::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 |
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Filter\Yui\CssCompressorFilter\filterDump(), Assetic\Filter\CssRewriteFilter\filterDump(), Assetic\Filter\JSMinPlusFilter\filterDump(), Assetic\Filter\JSMinFilter\filterDump(), Assetic\Filter\MinifyCssCompressorFilter\filterDump(), Assetic\Filter\GoogleClosure\CompilerApiFilter\filterDump(), Assetic\Filter\CssCacheBustingFilter\filterDump(), Assetic\Filter\GoogleClosure\CompilerJarFilter\filterDump(), Assetic\Filter\SeparatorFilter\filterDump(), Assetic\Filter\Yui\JsCompressorFilter\filterDump(), Assetic\Filter\OptiPngFilter\filterDump(), Assetic\Filter\PackerFilter\filterDump(), Assetic\Filter\JpegoptimFilter\filterDump(), Assetic\Filter\CssMinFilter\filterDump(), Assetic\Filter\JSqueezeFilter\filterDump(), Assetic\Filter\JpegtranFilter\filterDump(), Assetic\Filter\UglifyJs2Filter\filterDump(), Assetic\Filter\UglifyCssFilter\filterDump(), Assetic\Filter\CssEmbedFilter\filterDump(), Assetic\Filter\PngoutFilter\filterDump(), Assetic\Filter\UglifyJsFilter\filterDump(), Assetic\Filter\CleanCssFilter\filterDump(), Assetic\Filter\ReactJsxFilter\filterLoad(), Assetic\Filter\DartFilter\filterLoad(), Assetic\Filter\PhpCssEmbedFilter\filterLoad(), Assetic\Filter\TypeScriptFilter\filterLoad(), Assetic\Filter\EmberPrecompileFilter\filterLoad(), Assetic\Filter\PackagerFilter\filterLoad(), Assetic\Filter\CssImportFilter\filterLoad(), Assetic\Filter\RooleFilter\filterLoad(), Assetic\Filter\HandlebarsFilter\filterLoad(), Assetic\Filter\CoffeeScriptFilter\filterLoad(), Assetic\Filter\AutoprefixerFilter\filterLoad(), Assetic\Filter\SprocketsFilter\filterLoad(), Assetic\Filter\StylusFilter\filterLoad(), Assetic\Filter\GssFilter\filterLoad(), Assetic\Filter\LessphpFilter\filterLoad(), Assetic\Filter\ScssphpFilter\filterLoad(), Assetic\Filter\LessFilter\filterLoad(), Assetic\Filter\Sass\SassFilter\filterLoad(), and Assetic\Filter\CompassFilter\filterLoad().
Assetic\Asset\AssetInterface::setTargetPath | ( | $targetPath | ) |
Sets the URL for the current asset.
string | $targetPath | A web URL where the asset will be dumped |
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.
Referenced by Assetic\Factory\Worker\CacheBustingWorker\process().
Assetic\Asset\AssetInterface::setValues | ( | array | $values | ) |
Sets the values for the asset's variables.
array | $values |
Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, Assetic\Asset\AssetCache, and Assetic\Asset\GlobAsset.
Referenced by Assetic\AssetWriter\writeAsset().