API Documentation (v0.9.0-alpha)

Avolutions\Event\EntityEvent

extends Event

The EntityEvent is used for all Events dispatched by an Entity.

Properties

Property Visibility Type Description
$Entity public \Avolutions\Orm\Entity The Entity which dispatched the Event.
$EntityBeforeChange public ?\Avolutions\Orm\Entity The Entity before the changes are made.
$name protected string The name of the Event.

Methods

Method Visibility Description
__construct() public Creates a new EntityEvent object.
getName() public Returns the name of the Event. This is either the name of the class or if defined the value of the name property.

Property Details

$Entity

The Entity which dispatched the Event.

public Entity $Entity
$EntityBeforeChange

The Entity before the changes are made.

public Entity|null $EntityBeforeChange = null
$name

The name of the Event.

protected string $name

Method Details

__construct()

Creates a new EntityEvent object.

public __construct(string $name, Entity $Entity[, Entity|null $EntityBeforeChange = null ]) : mixed
Parameters

string $name
The name of the EntityEvent.

Entity $Entity
The Entity which dispatched the Event.

Entity|null $EntityBeforeChange (optional)
The Entity before the changes are made.

getName()

Returns the name of the Event. This is either the name of the class or if defined the value of the name property.

public getName() : string
Return values
string Returns the name of the Event. This is either the name of the class or if defined the value of the name property.