Alternatives to Zend Registry for ZF2 <p>I have just started using ZF2 and am really enjoying it.</p> <p>One thing that puzzles me a bit is the absence of a Registry component. I realise that the Service Manager makes the Registry obsolete in most cases. I rely on it heavily and its great.</p> <p>But from time to time I find myself needing access to a 'global' object, and I don't have access to the Service Manager. For example, in my Domain\User object I need access to a Zend\Log.</p> <p>I don't want to make the Service Manager available in my Domain objects, since they are beautiful and pristine, and unadulterated by such considerations. I could 'new' a log instance whenever required, but I do it so often I'd rather have a preconfigured instance to hand. I could wrap it in a singleton, but that seems like a backward step. I could create my own mini-registry, but if that was a good idea, I'm sure the Zend guys would have left such a component in place.</p> <p>So, what other options are there?</p> <p>EDIT:</p> <p>So, could I use Zend DI perhaps? I see this question partially covers it, <a href="http://stackoverflow.com/questions/13921897/configuring-class-alias-for-using-with-zend-di-di">Configuring class alias for using with Zend\Di\Di</a></p>