PHP Class Pagekit\Filter\FilterManager

Afficher le fichier Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Свойство Type Description
$defaults array
$filters Pagekit\Filter\FilterInterface[]

Méthodes publiques

Méthode Description
__construct ( array $defaults = null ) Constructor.
__invoke ( $value, $name, array $options = [] ) Apply shortcut.
apply ( mixed $value, string $name, array $options = [] ) : Pagekit\Filter\FilterInterface Apply a filter.
get ( string $name, array $options = [] ) : Pagekit\Filter\FilterInterface Gets a filter.
register ( string $name, string | Pagekit\Filter\FilterInterface $filter ) Registers a filter.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $defaults = null )
$defaults array

__invoke() public méthode

Apply shortcut.
See also: apply()
public __invoke ( $value, $name, array $options = [] )
$options array

apply() public méthode

Apply a filter.
public apply ( mixed $value, string $name, array $options = [] ) : Pagekit\Filter\FilterInterface
$value mixed
$name string
$options array
Résultat Pagekit\Filter\FilterInterface The filter

get() public méthode

Gets a filter.
public get ( string $name, array $options = [] ) : Pagekit\Filter\FilterInterface
$name string
$options array
Résultat Pagekit\Filter\FilterInterface The filter

register() public méthode

Registers a filter.
public register ( string $name, string | Pagekit\Filter\FilterInterface $filter )
$name string
$filter string | Pagekit\Filter\FilterInterface

Property Details

$defaults protected_oe property

protected array $defaults
Résultat array

$filters protected_oe property

protected FilterInterface[],Pagekit\Filter $filters
Résultat Pagekit\Filter\FilterInterface[]