interface AssetManagerInterface

Methods

prepareAssets( string $sourceAssetsDirectory, string $webAssetsDirectoryBase, $webAssetsTemplate, string $webAssetsKey)

Prepare an asset directory by checking that no changes occured in the source directory. If any change is detected, the whole asset directory is copied in the web space.

string
processAsset($assetSource, $assetDirectoryBase, string $webAssetsDirectoryBase, string $webAssetsTemplate, $webAssetsKey, string $outputUrl, string $assetType, array $filters, boolean $debug)

Generates assets from $assetpath in $outputpath, using $filters.

bool
isDebugMode()

No description

registerAssetFilter( string $filterIdentifier, FilterInterface $filter)

Register an asset filter

Details

at line 35
prepareAssets( string $sourceAssetsDirectory, string $webAssetsDirectoryBase, $webAssetsTemplate, string $webAssetsKey)

Prepare an asset directory by checking that no changes occured in the source directory. If any change is detected, the whole asset directory is copied in the web space.

Parameters

string $sourceAssetsDirectory the full path to the source asstes directory
string $webAssetsDirectoryBase the base directory of the web based asset directory
$webAssetsTemplate
string $webAssetsKey the assets key : module name or 0 for base template

Exceptions

RuntimeException if something goes wrong.

at line 58
string processAsset($assetSource, $assetDirectoryBase, string $webAssetsDirectoryBase, string $webAssetsTemplate, $webAssetsKey, string $outputUrl, string $assetType, array $filters, boolean $debug)

Generates assets from $assetpath in $outputpath, using $filters.

Parameters

$assetSource
$assetDirectoryBase
string $webAssetsDirectoryBase the full path to the asset file (or file collection, e.g. *.less)
string $webAssetsTemplate the full disk path to the base assets output directory in the web space
$webAssetsKey
string $outputUrl the URL to the base assets output directory in the web space
string $assetType the asset type: css, js, ... The generated files will have this extension. Pass an empty string to use the asset source extension.
array $filters a list of filters, as defined below (see switch($filter_name) ...)
boolean $debug true / false

Return Value

string The URL to the generated asset file.

at line 63
bool isDebugMode()

Return Value

bool true if the AssetManager was started in debug mode

at line 70
registerAssetFilter( string $filterIdentifier, FilterInterface $filter)

Register an asset filter

Parameters

string $filterIdentifier
FilterInterface $filter