Quote from ZF2 event manager doc:
The EventManager is a component designed for the following use cases:
- Implementing simple subject/observer patterns.
- Implementing Aspect-Oriented designs.
- Implementing event-driven architectures.
I’m confused about “aspect-oriented” part of it. I always thought that with aspect oriented programming “weaving” requires compile stage which PHP doesn’t have or injecting aspects into generated cached files as flow3 does (thus not touching your app code).
What does ZF2 mean by “event manager allows for aspect-oriented programming” ?
May be they think of events like aspects? While all framework object interaction done with event using single event manager it’s possible to inject you code into all the interactions easy.
P.S. It’s just a guess.