class AsseticAssetManager implements AssetManagerInterface

This class is a simple helper for generating assets using Assetic.

Methods

__construct($debugMode)

No description

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)

No description

Details

at line 37
__construct($debugMode)

Parameters

$debugMode

at line 151
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 246
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 312
bool isDebugMode()

Return Value

bool true if the AssetManager was started in debug mode

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

Parameters

string $filterIdentifier
FilterInterface $filter