public function getHandlerInstance($name) {
        if (is_array($this->eventHandlers[$name])) {
            // The listener has not been initialized
            $className = $this->eventHandlers[$name]['handler'];
            $params = $this->eventHandlers[$name]['params'];
            $handler = new $className($params ?: null);

            // Run initializers
            foreach ($this->initializers as $initializer) {
                $initializer->initialize($handler);
            }

            $this->eventHandlers[$name] = $handler;
        }

        return $this->eventHandlers[$name];
    }
public function getHandlerInstance($name) {
        if (is_array($this->eventHandlers[$name])) {
            // The listener has not been initialized
            $className = $this->eventHandlers[$name]['handler'];
            $params = $this->eventHandlers[$name]['params'];
            $handler = new $className($params ?: null);

            // Run initializers
            foreach ($this->initializers as $initializer) {
                $initializer->initialize($handler);
            }

            $this->eventHandlers[$name] = $handler;
        }

        return $this->eventHandlers[$name];
    }
public function getHandlerInstance ( $ name ) { if ( is_array ( $ this -> eventHandlers [ $ name ] ) ) { // The listener has not been initialized $ className = $ this -> eventHandlers [ $ name ] [ 'handler' ] ; $ params = $ this -> eventHandlers [ $ name ] [ 'params' ] ; $ handler = new $ className ( $ params ? : null ) ; // Run initializers foreach ( $ this -> initializers as $ initializer ) { $ initializer -> initialize ( $ handler ) ; } $ this -> eventHandlers [ $ name ] = $ handler ; } return $ this -> eventHandlers [ $ name ] ; }
Get a handler instance

@param string $name The name of the handler
@return ListenerInterface
Get a handler instance