PHP Класс MiniAsset\Factory

This class can make AssetCollections and FilterCollections based on the configuration object passed to it.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$config AssetConfig The config instance to make objects based on.

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
buildFilter ( string $name, array $config ) : MiniAsset\Filter\AssetFilterInterface Create a single filter

Описание методов

__construct() публичный Метод

Constructor
public __construct ( AssetConfig $config )
$config AssetConfig

assetCollection() публичный Метод

Create an AssetCollection with all the configured assets.
public assetCollection ( ) : AssetCollection
Результат AssetCollection

buildFilter() защищенный Метод

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.
Результат MiniAsset\Filter\AssetFilterInterface

cachedCompiler() публичный Метод

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.
Результат MiniAsset\Output\CachedCompiler

cacher() публичный Метод

Create an AssetCacher
public cacher ( string $path = '' ) : MiniAsset\AssetCacher
$path string The path to cache assets into.
Результат MiniAsset\AssetCacher

compiler() публичный Метод

Create an Compiler
public compiler ( boolean $debug = false ) : Compiler
$debug boolean Whether or not to enable debugging mode for the compiler.
Результат MiniAsset\Output\Compiler

filterRegistry() публичный Метод

Create a filter registry containing all the configured filters.
public filterRegistry ( ) : FilterRegistry
Результат MiniAsset\Filter\FilterRegistry

scanner() публичный Метод

Create a new scanner instance for the provided paths.
public scanner ( array $paths ) : AssetScanner
$paths array The paths to scan.
Результат AssetScanner

target() публичный Метод

Create a single build target
public target ( string $name ) : AssetTarget
$name string The name of the target to build
Результат AssetTarget

writer() публичный Метод

Create an AssetWriter
public writer ( string $tmpPath = '' ) : MiniAsset\AssetWriter
$tmpPath string The path where the build timestamp lookup should be stored.
Результат MiniAsset\AssetWriter

Описание свойств

$config защищенное свойство

The config instance to make objects based on.
protected AssetConfig,MiniAsset $config
Результат AssetConfig