class ListenersInvoker (View source)

A method invoker based on document lifecycle.

Constants

INVOKE_NONE

INVOKE_LISTENERS

INVOKE_CALLBACKS

INVOKE_MANAGER

Methods

__construct(DocumentManagerInterface $dm)

Initializes a new ListenersInvoker instance.

int
getSubscribedSystems(ClassMetadata $metadata, string $eventName)

Get the subscribed event systems.

invoke(ClassMetadata $metadata, string $eventName, object $document, EventArgs $event, $invoke)

Dispatches the lifecycle event of the given entity.

Details

__construct(DocumentManagerInterface $dm)

Initializes a new ListenersInvoker instance.

Parameters

DocumentManagerInterface $dm

int getSubscribedSystems(ClassMetadata $metadata, string $eventName)

Get the subscribed event systems.

Parameters

ClassMetadata $metadata
string $eventName The entity lifecycle event.

Return Value

int Bitmask of subscribed event systems.

invoke(ClassMetadata $metadata, string $eventName, object $document, EventArgs $event, $invoke)

Dispatches the lifecycle event of the given entity.

Parameters

ClassMetadata $metadata The entity metadata.
string $eventName The entity lifecycle event.
object $document The Entity on which the event occurred.
EventArgs $event The Event args.
$invoke