abstract class MappedEventSubscriber implements EventSubscriber

Class MappedEventSubscriber

Properties

static protected array $configurations Static List of cached object configurations leaving it static for reasons to look into other listener configuration
protected string $name Listener name, etc: breadcrumable

Methods

__construct()

Constructor

array
getConfiguration(ObjectManager $objectManager, string $class)

Get the configuration for specific object class if cache driver is present it scans it also

getExtensionMetadataFactory(ObjectManager $objectManager)

Get extended metadata mapping reader

setAnnotationReader(Reader $reader)

Set annotation reader class since older doctrine versions do not provide an interface it must provide these methods: getClassAnnotations([reflectionClass]) getClassAnnotation([reflectionClass], [name]) getPropertyAnnotations([reflectionProperty]) getPropertyAnnotation([reflectionProperty], [name])

void
loadMetadataForObjectClass(ObjectManager $objectManager, object $metadata)

Scans the objects for extended annotations event subscribers must subscribe to loadClassMetadata event

string
getNamespace()

Get the namespace of extension event subscriber.

ORM
getEventAdapter(EventArgs $args)

Get an event adapter to handle event specific methods

Details

at line 69
__construct()

Constructor

at line 85
array getConfiguration(ObjectManager $objectManager, string $class)

Get the configuration for specific object class if cache driver is present it scans it also

Parameters

ObjectManager $objectManager
string $class

Return Value

array

Exceptions

AnnotationException

at line 125
ExtensionMetadataFactory getExtensionMetadataFactory(ObjectManager $objectManager)

Get extended metadata mapping reader

Parameters

ObjectManager $objectManager

Return Value

ExtensionMetadataFactory

Exceptions

AnnotationException

at line 154
setAnnotationReader(Reader $reader)

Set annotation reader class since older doctrine versions do not provide an interface it must provide these methods: getClassAnnotations([reflectionClass]) getClassAnnotation([reflectionClass], [name]) getPropertyAnnotations([reflectionProperty]) getPropertyAnnotation([reflectionProperty], [name])

Parameters

Reader $reader
  • annotation reader class

at line 169
void loadMetadataForObjectClass(ObjectManager $objectManager, object $metadata)

Scans the objects for extended annotations event subscribers must subscribe to loadClassMetadata event

Parameters

ObjectManager $objectManager
object $metadata

Return Value

void

Exceptions

AnnotationException

at line 190
abstract protected string getNamespace()

Get the namespace of extension event subscriber.

used for cache id of extensions also to know where to find Mapping drivers and event adapters

Return Value

string

at line 200
protected ORM getEventAdapter(EventArgs $args)

Get an event adapter to handle event specific methods

Parameters

EventArgs $args

Return Value

ORM