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|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
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–2017 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/3.3/class-Cake.Event.Event.html