PHP Class Fuel\Event\Listener

Datei anzeigen Open project: fuelphp/event

Public Properties

Property Type Description
$priority integer priority

Protected Properties

Property Type Description
$context mixed handler context
$event string event name
$handler mixed event handler
$propagate boolean continue propagation boolean

Public Methods

Method Description
__construct ( string $event, callable $handler, mixed $context = null, integer $priority = null ) Constructor
__invoke ( string $event, array $args ) : mixed Invoke handler forewarder.
context ( ) : mixed Retrieve the Event context
handler ( ) : mixed Retrieve the Event handler
is ( $event, $handler, $context ) : boolean Retrieve wether the event object matches a set of event params.
name ( ) : string Retrieve the Event name
propagationStopped ( ) : boolean Returns wether event propagation should continue.
stopPropagation ( ) : object Prevents further events from being fired.

Method Details

__construct() public method

Constructor
public __construct ( string $event, callable $handler, mixed $context = null, integer $priority = null )
$event string event name
$handler callable handler
$context mixed closure context
$priority integer closure context

__invoke() public method

Invoke handler forewarder.
public __invoke ( string $event, array $args ) : mixed
$event string triggered event
$args array handler arguments
return mixed handler return value

context() public method

Retrieve the Event context
public context ( ) : mixed
return mixed event context

handler() public method

Retrieve the Event handler
public handler ( ) : mixed
return mixed event handler

is() public method

Retrieve wether the event object matches a set of event params.
public is ( $event, $handler, $context ) : boolean
return boolean wether the event object matches the params

name() public method

Retrieve the Event name
public name ( ) : string
return string event name

propagationStopped() public method

Returns wether event propagation should continue.
public propagationStopped ( ) : boolean
return boolean wether event propagation should continue.

stopPropagation() public method

Prevents further events from being fired.
public stopPropagation ( ) : object
return object $this

Property Details

$context protected_oe property

handler context
protected mixed $context
return mixed

$event protected_oe property

event name
protected string $event
return string

$handler protected_oe property

event handler
protected mixed $handler
return mixed

$priority public_oe property

priority
public int $priority
return integer

$propagate protected_oe property

continue propagation boolean
protected bool $propagate
return boolean