PHP Class MiniAsset\Factory

This class can make AssetCollections and FilterCollections based on the configuration object passed to it.
Afficher le fichier Open project: markstory/mini-asset Class Usage Examples

Protected Properties

Свойство Type Description
$config AssetConfig The config instance to make objects based on.

Méthodes publiques

Méthode Description
__construct ( AssetConfig $config ) Constructor
assetCollection ( ) : AssetCollection Create an AssetCollection with all the configured assets.
cachedCompiler ( string $outputDir = '', boolean $debug = false ) : CachedCompiler Create a Caching Compiler
cacher ( string $path = '' ) : MiniAsset\AssetCacher Create an AssetCacher
compiler ( boolean $debug = false ) : Compiler Create an Compiler
filterRegistry ( ) : FilterRegistry Create a filter registry containing all the configured filters.
scanner ( array $paths ) : AssetScanner Create a new scanner instance for the provided paths.
target ( string $name ) : AssetTarget Create a single build target
writer ( string $tmpPath = '' ) : MiniAsset\AssetWriter Create an AssetWriter

Méthodes protégées

Méthode Description
buildFilter ( string $name, array $config ) : MiniAsset\Filter\AssetFilterInterface Create a single filter

Method Details

__construct() public méthode

Constructor
public __construct ( AssetConfig $config )
$config AssetConfig

assetCollection() public méthode

Create an AssetCollection with all the configured assets.
public assetCollection ( ) : AssetCollection
Résultat AssetCollection

buildFilter() protected méthode

Create a single filter
protected buildFilter ( string $name, array $config ) : MiniAsset\Filter\AssetFilterInterface
$name string The name of the filter to build.
$config array The configuration for the filter.
Résultat MiniAsset\Filter\AssetFilterInterface

cachedCompiler() public méthode

Create a Caching Compiler
public cachedCompiler ( string $outputDir = '', boolean $debug = false ) : CachedCompiler
$outputDir string The directory to output cached files to.
$debug boolean Whether or not to enable debugging mode for the compiler.
Résultat MiniAsset\Output\CachedCompiler

cacher() public méthode

Create an AssetCacher
public cacher ( string $path = '' ) : MiniAsset\AssetCacher
$path string The path to cache assets into.
Résultat MiniAsset\AssetCacher

compiler() public méthode

Create an Compiler
public compiler ( boolean $debug = false ) : Compiler
$debug boolean Whether or not to enable debugging mode for the compiler.
Résultat MiniAsset\Output\Compiler

filterRegistry() public méthode

Create a filter registry containing all the configured filters.
public filterRegistry ( ) : FilterRegistry
Résultat MiniAsset\Filter\FilterRegistry

scanner() public méthode

Create a new scanner instance for the provided paths.
public scanner ( array $paths ) : AssetScanner
$paths array The paths to scan.
Résultat AssetScanner

target() public méthode

Create a single build target
public target ( string $name ) : AssetTarget
$name string The name of the target to build
Résultat AssetTarget

writer() public méthode

Create an AssetWriter
public writer ( string $tmpPath = '' ) : MiniAsset\AssetWriter
$tmpPath string The path where the build timestamp lookup should be stored.
Résultat MiniAsset\AssetWriter

Property Details

$config protected_oe property

The config instance to make objects based on.
protected AssetConfig,MiniAsset $config
Résultat AssetConfig