|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
The asset factory creates asset objects. More...
Collaboration diagram for Assetic\Factory\AssetFactory:Public Member Functions | |
| __construct ($root, $debug=false) | |
| Constructor. More... | |
| setDebug ($debug) | |
| Sets debug mode for the current factory. More... | |
| isDebug () | |
| Checks if the factory is in debug mode. More... | |
| setDefaultOutput ($output) | |
| Sets the default output string. More... | |
| addWorker (WorkerInterface $worker) | |
| Adds a factory worker. More... | |
| getAssetManager () | |
| Returns the current asset manager. More... | |
| setAssetManager (AssetManager $am) | |
| Sets the asset manager to use when creating asset references. More... | |
| getFilterManager () | |
| Returns the current filter manager. More... | |
| setFilterManager (FilterManager $fm) | |
| Sets the filter manager to use when adding filters. More... | |
| createAsset ($inputs=array(), $filters=array(), array $options=array()) | |
| Creates a new asset. More... | |
| generateAssetName ($inputs, $filters, $options=array()) | |
| getLastModified (AssetInterface $asset) | |
Protected Member Functions | |
| parseInput ($input, array $options=array()) | |
| Parses an input string string into an asset. More... | |
| createAssetCollection (array $assets=array(), array $options=array()) | |
| createAssetReference ($name) | |
| createHttpAsset ($sourceUrl, $vars) | |
| createGlobAsset ($glob, $root=null, $vars) | |
| createFileAsset ($source, $root=null, $path=null, $vars) | |
| getFilter ($name) | |
Private Member Functions | |
| applyWorkers (AssetCollectionInterface $asset) | |
| Filters an asset collection through the factory workers. More... | |
Static Private Member Functions | |
| static | isAbsolutePath ($path) |
| static | findRootDir ($path, array $roots) |
| Loops through the root directories and returns the first match. More... | |
Private Attributes | |
| $root | |
| $debug | |
| $output | |
| $workers | |
| $am | |
| $fm | |
The asset factory creates asset objects.
Definition at line 31 of file AssetFactory.php.
| Assetic\Factory\AssetFactory::__construct | ( | $root, | |
$debug = false |
|||
| ) |
Constructor.
| string | $root | The default root directory |
| Boolean | $debug | Filters prefixed with a "?" will be omitted in debug mode |
Definition at line 46 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$debug, and Assetic\Factory\AssetFactory\$root.
| Assetic\Factory\AssetFactory::addWorker | ( | WorkerInterface | $worker | ) |
Adds a factory worker.
| WorkerInterface | $worker | A worker |
Definition at line 89 of file AssetFactory.php.
|
private |
Filters an asset collection through the factory workers.
Each leaf asset will be processed first, followed by the asset collection itself.
| AssetCollectionInterface | $asset | An asset collection |
Definition at line 380 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\createAssetCollection(), and Assetic\Asset\AssetCollectionInterface\replaceLeaf().
Referenced by Assetic\Factory\AssetFactory\createAsset().
Here is the call graph for this function:
Here is the caller graph for this function:| Assetic\Factory\AssetFactory::createAsset | ( | $inputs = array(), |
|
$filters = array(), |
|||
| array | $options = array() |
||
| ) |
Creates a new asset.
Prefixing a filter name with a question mark will cause it to be omitted when the factory is in debug mode.
Available options:
| array | string | $inputs | An array of input strings |
| array | string | $filters | An array of filter names |
| array | $options | An array of options |
Definition at line 153 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$debug, $options, Assetic\Factory\AssetFactory\$output, Assetic\Factory\AssetFactory\$root, Assetic\Factory\AssetFactory\applyWorkers(), Assetic\Factory\AssetFactory\createAssetCollection(), Assetic\Factory\AssetFactory\generateAssetName(), Assetic\Factory\AssetFactory\getFilter(), and Assetic\Factory\AssetFactory\parseInput().
Referenced by Assetic\Filter\LessFilter\getChildren(), Assetic\Filter\LessphpFilter\getChildren(), and Assetic\Filter\ScssphpFilter\getChildren().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 332 of file AssetFactory.php.
References $options.
Referenced by Assetic\Factory\AssetFactory\applyWorkers(), and Assetic\Factory\AssetFactory\createAsset().
Here is the caller graph for this function:
|
protected |
Definition at line 337 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\parseInput().
Here is the caller graph for this function:
|
protected |
Definition at line 356 of file AssetFactory.php.
References $path, and Assetic\Factory\AssetFactory\$root.
Referenced by Assetic\Factory\AssetFactory\parseInput().
Here is the caller graph for this function:
|
protected |
Definition at line 351 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$root.
Referenced by Assetic\Factory\AssetFactory\parseInput().
Here is the caller graph for this function:
|
protected |
Definition at line 346 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\parseInput().
Here is the caller graph for this function:
|
staticprivate |
Loops through the root directories and returns the first match.
| string | $path | An absolute path |
| array | $roots | An array of root directories |
Definition at line 416 of file AssetFactory.php.
References $path, and Assetic\Factory\AssetFactory\$root.
| Assetic\Factory\AssetFactory::generateAssetName | ( | $inputs, | |
| $filters, | |||
$options = array() |
|||
| ) |
Definition at line 240 of file AssetFactory.php.
References $options.
Referenced by Assetic\Factory\AssetFactory\createAsset().
Here is the caller graph for this function:| Assetic\Factory\AssetFactory::getAssetManager | ( | ) |
Returns the current asset manager.
Definition at line 99 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$am.
|
protected |
Definition at line 361 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\createAsset().
Here is the caller graph for this function:| Assetic\Factory\AssetFactory::getFilterManager | ( | ) |
Returns the current filter manager.
Definition at line 119 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$fm.
| Assetic\Factory\AssetFactory::getLastModified | ( | AssetInterface | $asset | ) |
Definition at line 251 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\getLastModified().
Referenced by Assetic\Factory\Worker\CacheBustingWorker\getHash(), and Assetic\Factory\AssetFactory\getLastModified().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
| Assetic\Factory\AssetFactory::isDebug | ( | ) |
Checks if the factory is in debug mode.
Definition at line 69 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$debug.
|
protected |
Parses an input string string into an asset.
The input string can be one of the following:
Both globs and paths will be absolutized using the current root directory.
| string | $input | An input string |
| array | $options | An array of options |
Definition at line 303 of file AssetFactory.php.
References $options, $path, Assetic\Factory\AssetFactory\$root, Assetic\Factory\AssetFactory\createAssetReference(), Assetic\Factory\AssetFactory\createFileAsset(), Assetic\Factory\AssetFactory\createGlobAsset(), and Assetic\Factory\AssetFactory\createHttpAsset().
Referenced by Assetic\Factory\AssetFactory\createAsset().
Here is the call graph for this function:
Here is the caller graph for this function:| Assetic\Factory\AssetFactory::setAssetManager | ( | AssetManager | $am | ) |
Sets the asset manager to use when creating asset references.
| AssetManager | $am | The asset manager |
Definition at line 109 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$am.
| Assetic\Factory\AssetFactory::setDebug | ( | $debug | ) |
Sets debug mode for the current factory.
| Boolean | $debug | Debug mode |
Definition at line 59 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$debug.
| Assetic\Factory\AssetFactory::setDefaultOutput | ( | $output | ) |
Sets the default output string.
| string | $output | The default output string |
Definition at line 79 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$output.
| Assetic\Factory\AssetFactory::setFilterManager | ( | FilterManager | $fm | ) |
Sets the filter manager to use when adding filters.
| FilterManager | $fm | The filter manager |
Definition at line 129 of file AssetFactory.php.
References Assetic\Factory\AssetFactory\$fm.
|
private |
Definition at line 37 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\getAssetManager(), and Assetic\Factory\AssetFactory\setAssetManager().
|
private |
Definition at line 34 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\__construct(), Assetic\Factory\AssetFactory\createAsset(), Assetic\Factory\AssetFactory\isDebug(), and Assetic\Factory\AssetFactory\setDebug().
|
private |
Definition at line 38 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\getFilterManager(), and Assetic\Factory\AssetFactory\setFilterManager().
|
private |
Definition at line 35 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\createAsset(), and Assetic\Factory\AssetFactory\setDefaultOutput().
|
private |
Definition at line 33 of file AssetFactory.php.
Referenced by Assetic\Factory\AssetFactory\__construct(), Assetic\Factory\AssetFactory\createAsset(), Assetic\Factory\AssetFactory\createFileAsset(), Assetic\Factory\AssetFactory\createGlobAsset(), Assetic\Factory\AssetFactory\findRootDir(), and Assetic\Factory\AssetFactory\parseInput().
|
private |
Definition at line 36 of file AssetFactory.php.