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.
__construct( string $name , object|null $subject null , array|null $data null )
Constructor
$event = new Event('Order.afterBuy', $this, ['buyer' => $userData]); $event = new Event('User.afterRegister', $UserModel);
$name
$subject
optional null $data
optional null __get( string $attribute )
Dynamically returns the name and subject if accessed directly
$attribute
mixed
isStopped( )
Check if the event is stopped
boolean
name( )
Returns the name of this event. This is usually used as the event identifier
string
© 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.
http://api.cakephp.org/3.1/class-Cake.Event.Event.html