PHP 클래스 MiniAsset\Filter\FilterRegistry

Useful for holding onto loaded filters and creating collections of filters based on specific target requirements.
파일 보기 프로젝트 열기: markstory/mini-asset 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$filters array The loaded filters.

공개 메소드들

메소드 설명
__construct ( array $filters = [] ) Constructor
add ( string $name, MiniAsset\Filter\FilterInterface $filter ) : void Add a filter to the registry
collection ( AssetTarget $target ) : FilterCollection Get a filter collection for a specific target.
contains ( string $name ) : boolean Check if the registry contains a named filter.
get ( string $name ) : MiniAsset\Filter\FilterInterface | null Get a filter from the registry
remove ( string $name ) : void Remove a filter from the registry

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( array $filters = [] )
$filters array A list of filters to load.

add() 공개 메소드

Add a filter to the registry
public add ( string $name, MiniAsset\Filter\FilterInterface $filter ) : void
$name string The filter name to load.
$filter MiniAsset\Filter\FilterInterface The filter to load.
리턴 void

collection() 공개 메소드

Get a filter collection for a specific target.
public collection ( AssetTarget $target ) : FilterCollection
$target MiniAsset\AssetTarget The target to get a filter collection for.
리턴 FilterCollection

contains() 공개 메소드

Check if the registry contains a named filter.
public contains ( string $name ) : boolean
$name string The filter name to check.
리턴 boolean

get() 공개 메소드

Get a filter from the registry
public get ( string $name ) : MiniAsset\Filter\FilterInterface | null
$name string The filter name to fetch.
리턴 MiniAsset\Filter\FilterInterface | null

remove() 공개 메소드

Remove a filter from the registry
public remove ( string $name ) : void
$name string The filter name to remove
리턴 void

프로퍼티 상세

$filters 보호되어 있는 프로퍼티

The loaded filters.
protected array $filters
리턴 array