FileAccess Orion

FilterChain
in package
implements FilterInterface

FilterChain: intercepting filter manager

Interfaces, Classes, Traits and Enums

FilterInterface
Interface for intercepting filter chains

Table of Contents

$filters  : FilterIterator
__construct()  : mixed
Constructor
attach()  : CallbackHandler
Connect a filter to the chain
clearFilters()  : void
Clear all filters
detach()  : bool
Detach a filter from the chain
getFilters()  : FilterIterator
Retrieve all filters
getResponses()  : null|ResponseCollection
Return current responses
run()  : mixed
Apply the filters

Properties

Methods

__construct()

Constructor

public __construct() : mixed

Initializes Filter\FilterIterator in which filters will be aggregated

Return values
mixed

attach()

Connect a filter to the chain

public attach(callable $callback[, int $priority = 1 ]) : CallbackHandler
Parameters
$callback : callable

PHP Callback

$priority : int = 1

Priority in the queue at which to execute; defaults to 1 (higher numbers == higher priority)

Tags
throws
InvalidCallbackException
Return values
CallbackHandler

(to allow later unsubscribe)

clearFilters()

Clear all filters

public clearFilters() : void
Return values
void

detach()

Detach a filter from the chain

public detach(callable $filter) : bool
Parameters
$filter : callable
Return values
bool

Returns true if filter found and unsubscribed; returns false otherwise

run()

Apply the filters

public run(mixed $context[, mixed $argv = [] ]) : mixed

Begins iteration of the filters.

Parameters
$context : mixed

Object under observation

$argv : mixed = []

Associative array of arguments

Return values
mixed

Search results