mini\Hooks\Filter class

Documentation

Chain of listeners that transform a value Each listener receives the value and returns a (potentially) modified version

Inheritance

Extends: mini\Hooks\Dispatcher

Properties (1)

protected array $listeners

Methods (15)

Filter a value through all registered listeners

Register a filter function

Unsubscribe filter function

public __construct()
inherited from mini\Hooks\Dispatcher

Documentation missing

public final getDescription()
inherited from mini\Hooks\Dispatcher

Get a description of the event dispatcher

public final getFile()
inherited from mini\Hooks\Dispatcher

Get the filename where this event dispatcher was created

public final getLine()
inherited from mini\Hooks\Dispatcher

Get the line number where this event dispatcher was created

public static final configure()
inherited from mini\Hooks\Dispatcher

Configure event loop integration

protected invokeAll()
inherited from mini\Hooks\Dispatcher

Invoke all listeners in an array

protected static handleException()
inherited from mini\Hooks\Dispatcher

Handle an exception from a listener

protected static filterArray()
inherited from mini\Hooks\Dispatcher

Filter array to remove specific values

protected static defer()
inherited from mini\Hooks\Dispatcher

Schedule a function to run when runEvents() is called

protected static runEvents()
inherited from mini\Hooks\Dispatcher

Run all scheduled events

protected filterArrays()
inherited from mini\Hooks\Dispatcher

Remove values from multiple arrays by reference

protected static invoke()
inherited from mini\Hooks\Dispatcher

Invoke a listener with exception handling

Source

src/Hooks/Filter.php:14-61