Hello Gerard,

> In zf2, most "Manager" classes such as `Zend\ServiceManager\ServiceManager`, 
> `Zend\EventManager\EventManager`, `Zend\Mvc\Controller\PluginManager` are 
> assigned to variable names like `$services`, `$events`, `$plugins`.
> 
> I feel these instances should be named after what they *are*, and not after 
> what it feels like to use them. They are not arrays or collections. They are 
> composed of arrays or collections.
> 
> The use of shorthand leads to code that like this:
> 
>     $events = $events->getEvents();
>     $plugins = $plugins->getPlugins();
>     $services = $services->getServices();
> 
> which feels like:
> 
> {image}

Done!

> I didn't want to rip out the image because it made me smile and this early in 
> the morning you sometimes need that. I must be getting soft, I'm usually 
> ruthless about this stuff.

Well, have a nice day - and everyone else on this list and everywhere else, too!


Best regards,

Andreas

Reply via email to