Represents the transport class of events across the system. It receives a name, subject and an optional payload. The name can be any string that uniquely identifies the event across the application, while the subject represents the object that the event applies to.
$_name
protected string
$_stopped
protected boolean
$_subject
protected object
$data
public mixed
$result
public mixed
__construct( string $name , object $subject null , mixed $data null )
Constructor
$name
$subject
optional null $data
optional null any value you wish to be transported with this event to it can be read by listeners
$event = new CakeEvent('Order.afterBuy', $this, array('buyer' => $userData)); $event = new CakeEvent('User.afterRegister', $UserModel);
__get( string $attribute )
Dynamically returns the name and subject if accessed directly
$attribute
isStopped( )
Check if the event is stopped
name( )
Returns the name of this event. This is usually used as the event identifier
protected object
The object this event applies to (usually the same object that generates the event)
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-CakeEvent.html