ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Assetic\Asset\AssetInterface Interface Reference

An asset has a mutable URL and content and can be loaded and dumped. More...

+ Inheritance diagram for Assetic\Asset\AssetInterface:
+ Collaboration diagram for Assetic\Asset\AssetInterface:

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...
 

Detailed Description

An asset has a mutable URL and content and can be loaded and dumped.

Author
Kris Wallsmith kris..nosp@m.wall.nosp@m.smith.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Definition at line 21 of file AssetInterface.php.

Member Function Documentation

◆ clearFilters()

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.

◆ dump()

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.

Parameters
FilterInterface$additionalFilterAn additional filter
Returns
string The filtered content of the current asset

Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, Assetic\Asset\AssetCache, and Assetic\Asset\GlobAsset.

Referenced by Assetic\AssetWriter\writeAsset().

+ Here is the caller graph for this function:

◆ ensureFilter()

Assetic\Asset\AssetInterface::ensureFilter ( FilterInterface  $filter)

Ensures the current asset includes the supplied filter.

Parameters
FilterInterface$filterA filter

Implemented in Assetic\Asset\AssetCollection, Assetic\Asset\BaseAsset, Assetic\Asset\AssetReference, and Assetic\Asset\AssetCache.

Referenced by Assetic\Factory\Worker\EnsureFilterWorker\process().

+ Here is the caller graph for this function:

◆ getContent()

Assetic\Asset\AssetInterface::getContent ( )

Returns the loaded content of the current asset.

Returns
string The 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().

+ Here is the caller graph for this function:

◆ getFilters()

Assetic\Asset\AssetInterface::getFilters ( )

Returns an array of filters currently applied.

Returns
array An array of filters

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().

+ Here is the caller graph for this function:

◆ getLastModified()

Assetic\Asset\AssetInterface::getLastModified ( )

Returns the time the current asset was last modified.

Returns
integer|null A UNIX timestamp

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().

+ Here is the caller graph for this function:

◆ getSourceDirectory()

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.

Returns
string|null The asset's source directory

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().

+ Here is the caller graph for this function:

◆ getSourcePath()

Assetic\Asset\AssetInterface::getSourcePath ( )

◆ getSourceRoot()

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:

Returns
string|null The asset's root

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().

+ Here is the caller graph for this function:

◆ getTargetPath()

◆ getValues()

Assetic\Asset\AssetInterface::getValues ( )

Returns the current values for this asset.

Returns
array an array of strings

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().

+ Here is the caller graph for this function:

◆ getVars()

Assetic\Asset\AssetInterface::getVars ( )

◆ load()

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.

Parameters
FilterInterface$additionalFilterAn 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().

+ Here is the caller graph for this function:

◆ setContent()

Assetic\Asset\AssetInterface::setContent (   $content)

Sets the content of the current asset.

Filters can use this method to change the content of the asset.

Parameters
string$contentThe 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().

+ Here is the caller graph for this function:

◆ setTargetPath()

Assetic\Asset\AssetInterface::setTargetPath (   $targetPath)

Sets the URL for the current asset.

Parameters
string$targetPathA 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().

+ Here is the caller graph for this function:

◆ setValues()

Assetic\Asset\AssetInterface::setValues ( array  $values)

Sets the values for the asset's variables.

Parameters
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().

+ Here is the caller graph for this function:

The documentation for this interface was generated from the following file: