public function getComponent()
    {
        if (! ($this->_controller instanceof LibBaseControllerAbstract)) {

            $this->_controller = $this->getController();

            if (! $this->_controller instanceof LibBaseControllerAbstract) {
                throw new \UnexpectedValueException(
                    'Dispatcher: '.get_class($this->_controller).' does not implement LibBaseDispatcherAbstract',
                    AnHttpResponse::INTERNAL_SERVER_ERROR
                );
            }
        }

        return $this->_controller;
    }
public function getComponent()
    {
        if (! ($this->_controller instanceof LibBaseControllerAbstract)) {

            $this->_controller = $this->getController();

            if (! $this->_controller instanceof LibBaseControllerAbstract) {
                throw new \UnexpectedValueException(
                    'Dispatcher: '.get_class($this->_controller).' does not implement LibBaseDispatcherAbstract',
                    AnHttpResponse::INTERNAL_SERVER_ERROR
                );
            }
        }

        return $this->_controller;
    }
public function getComponent ( ) { if ( ! ( $ this -> _controller instanceof LibBaseControllerAbstract ) ) { $ this -> _controller = $ this -> getController ( ) ; if ( ! $ this -> _controller instanceof LibBaseControllerAbstract ) { throw new \ UnexpectedValueException ( 'Dispatcher: ' . get_class ( $ this -> _controller ) . ' does not implement LibBaseDispatcherAbstract' , AnHttpResponse :: INTERNAL_SERVER_ERROR ) ; } } return $ this -> _controller ; }
Method to get a dispatcher object.

@throws \UnexpectedValueException If the controller doesn't implement the ControllerInterface

@return LibBaseControllerAbstract
Method to get a dispatcher object .