class LoadClassMetadataEventArgs extends EventArgs (View source)

Class that holds event arguments for a loadMetadata event.

Methods

static EventArgs
getEmptyInstance()

Gets the single, empty and immutable EventArgs instance.

from EventArgs
__construct(ClassMetadata $classMetadata, ObjectManager $objectManager)

Constructor.

getClassMetadata()

Retrieves the associated ClassMetadata.

getObjectManager()

Retrieves the associated ObjectManager.

Details

static EventArgs getEmptyInstance()

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter, like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared (otherwise there would be instances for every dispatched in the abovementioned form).

Return Value

EventArgs

See also

EventManager::dispatchEvent

__construct(ClassMetadata $classMetadata, ObjectManager $objectManager)

Constructor.

Parameters

ClassMetadata $classMetadata
ObjectManager $objectManager

ClassMetadata getClassMetadata()

Retrieves the associated ClassMetadata.

Return Value

ClassMetadata

ObjectManager getObjectManager()

Retrieves the associated ObjectManager.

Return Value

ObjectManager