bind()
bind(callable $function, integer $precedence) : void
Assigns new hook for a given action
Optional precedence may be assigned.
Parameters
callable | $function | |
integer | $precedence | (default: 0) |
Defines an Event hook
This class defines a type of hook that simply triggers each callback sequentially. The callbacks can accept an arbitrary number of arguments, but they must match each other's signature. The result of each callback is return in an array
trigger(array $args = array(), mixed $precedence = null) : array
Invokes all callback attached to the event
If null precedence is provided, invokes all hooks for a given event, regardless of precedence.
array | $args | An array of parameters to be passed to each hook. |
mixed | $precedence | (default: null) If provided, this hook will only execute the callbacks of the supplied precedence. |