Hello Artur,

> Reference please.

Search for

* $events
* protected $events

in clones of

* git://github.com/zendframework/zf2-documentation.git
* git://github.com/zendframework/zf2.git

> In general, "events" is just a shorthand. It is used througout communication 
> to reference either EM, Event object (or its subclass, i.e. "mvc event"), 
> event type name (i.e. "dispatch events") or the fact of triggering an event.  

Exactly!

And that's the point - most occurrences refer to instances of EventManager, 
rather than - what one would expect from the naming - a collection of events, 
an array of events, etc. To make it more clear what it *really* is, instances 
should be named $eventManager, I believe. 

While a shorthand  might be useful if one is short in time, it's not so useful 
in conveying what the object referred to really is. I know that this has been 
done very often when referring to Doctrine's EventManager ($em), but I don't 
think it's good practice.

> It might be hectic in some places in the manual, however I am unable to 
> determine if it's messed up enough to be confusing for beginners. Better ask 
> some genuine beginner about that….

I'm a ZF2 beginner - and I find it both confusing and inconsistent. That's the 
same for instances of the ServiceManager or ServiceLocator or instances 
implementing the ServiceLocatorInterface.


Best regards,

Andreas
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to