PHP Trait Fuel\Event\EventTrait

Datei anzeigen Open project: fuelphp/event

Protected Properties

Property Type Description
$_eventBindSelf boolean wether to bind itself to the events
$_eventContainer Container event container
$_eventPrependSelf boolean wether to prepend itself to the arguments array

Public Methods

Method Description
off ( string $event = null, mixed $handler = null, mixed $context = null ) : object Removes one or more events.
on ( string $event, callable $handler, mixed $context = null, $priority ) : object Attaches a new event.
trigger ( string $event, $arguments = [] ) : object Trigger an event.

Method Details

off() public method

Removes one or more events.
public off ( string $event = null, mixed $handler = null, mixed $context = null ) : object
$event string event name
$handler mixed event handler
$context mixed closure context
return object $this

on() public method

Attaches a new event.
public on ( string $event, callable $handler, mixed $context = null, $priority ) : object
$event string event name
$handler callable event handler
$context mixed closure context
return object $this

trigger() public method

Trigger an event.
public trigger ( string $event, $arguments = [] ) : object
$event string event to trigger
return object $this

Property Details

$_eventBindSelf protected_oe property

wether to bind itself to the events
protected bool $_eventBindSelf
return boolean

$_eventContainer protected_oe property

event container
protected Container,Fuel\Event $_eventContainer
return Container

$_eventPrependSelf protected_oe property

wether to prepend itself to the arguments array
protected bool $_eventPrependSelf
return boolean