PHP Class Themosis\Hook\ActionBuilder

Inheritance: extends Hook
Show file Open project: themosis/framework

Public Methods

Method Description
run ( string $hook, mixed $args = null ) : mixed Run all actions registered with the hook.

Protected Methods

Method Description
addEventListener ( string $name, Closure | string $callback, integer $priority, integer $accepted_args ) Add an action event for the specified hook.

Method Details

addEventListener() protected method

Add an action event for the specified hook.
protected addEventListener ( string $name, Closure | string $callback, integer $priority, integer $accepted_args )
$name string
$callback Closure | string
$priority integer
$accepted_args integer

run() public method

Run all actions registered with the hook.
public run ( string $hook, mixed $args = null ) : mixed
$hook string The action hook name.
$args mixed
return mixed