Configuring class alias for using with Zend\Di\Di
问题 I have a logger class (Application\Debug\Logger) for logging various debug messages from whole application to log files. And I would like to get instance of that class using simple alias 'logger'. So I try to configure Zend\Di\Di, so that I could do something like this in, for example, module controller or another application components: $di = new \Zend\Di\Di(); $logger = $di->get('logger'); //$logger should be Application\Debug\Logger instance... To achieve this, I have this in Application