EntityListenerBuilder
in package
Builder for entity listeners.
Table of Contents
- $events : array<string, bool>
- bindEntityListener() : void
- Lookup the entity class to find methods that match to event lifecycle names
Properties
$events
private
static array<string, bool>
$events
= [\Doctrine\ORM\Events::preRemove => true, \Doctrine\ORM\Events::postRemove => true, \Doctrine\ORM\Events::prePersist => true, \Doctrine\ORM\Events::postPersist => true, \Doctrine\ORM\Events::preUpdate => true, \Doctrine\ORM\Events::postUpdate => true, \Doctrine\ORM\Events::postLoad => true, \Doctrine\ORM\Events::preFlush => true]
Hash-map to handle event names.
Methods
bindEntityListener()
Lookup the entity class to find methods that match to event lifecycle names
public
static bindEntityListener(ClassMetadata $metadata, string $className) : void
Parameters
- $metadata : ClassMetadata
-
The entity metadata.
- $className : string
-
The listener class name.