src/Web/Servlet/DispatcherServlet.php
protected function initHandlerAdapters()
    {
        $this->logger->debug('Initializing HandlerAdapters.');
        $this->handlerAdapters = array();
        if ($this->detectAllHandlerAdapters) {
            $this->logger->debug('Scanning beans for HandlerAdapters.');
            $beans = BeanUtils::beansOfType($this->applicationContext, "Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter");
            if (!empty($beans)) {
                $this->handlerAdapters = array_values($beans);
            }
        } else {
            $this->logger->debug('Looking up HandlerAdapter bean by name.');
            $handlerAdapter = $this->initialContext->lookup(self::HANDLER_ADAPTER_BEAN_NAME);
            if ($handlerAdapter != null && $handlerAdapter instanceof HandlerAdapter) {
                $this->handlerAdapters = array($handlerAdapter);
            }
        }
        if (empty($this->handlerAdapters)) {
            $this->logger->warning('Could not find any bean of type HandlerAdapter, falling back to default strategy.');
            $this->viewResolvers = $this->getDefaultStrategies("Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter");
        }
    }
protected function initHandlerAdapters()
    {
        $this->logger->debug('Initializing HandlerAdapters.');
        $this->handlerAdapters = array();
        if ($this->detectAllHandlerAdapters) {
            $this->logger->debug('Scanning beans for HandlerAdapters.');
            $beans = BeanUtils::beansOfType($this->applicationContext, "Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter");
            if (!empty($beans)) {
                $this->handlerAdapters = array_values($beans);
            }
        } else {
            $this->logger->debug('Looking up HandlerAdapter bean by name.');
            $handlerAdapter = $this->initialContext->lookup(self::HANDLER_ADAPTER_BEAN_NAME);
            if ($handlerAdapter != null && $handlerAdapter instanceof HandlerAdapter) {
                $this->handlerAdapters = array($handlerAdapter);
            }
        }
        if (empty($this->handlerAdapters)) {
            $this->logger->warning('Could not find any bean of type HandlerAdapter, falling back to default strategy.');
            $this->viewResolvers = $this->getDefaultStrategies("Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter");
        }
    }
protected function initHandlerAdapters ( ) { $ this -> logger -> debug ( 'Initializing HandlerAdapters.' ) ; $ this -> handlerAdapters = array ( ) ; if ( $ this -> detectAllHandlerAdapters ) { $ this -> logger -> debug ( 'Scanning beans for HandlerAdapters.' ) ; $ beans = BeanUtils :: beansOfType ( $ this -> applicationContext , "Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter" ) ; if ( ! empty ( $ beans ) ) { $ this -> handlerAdapters = array_values ( $ beans ) ; } } else { $ this -> logger -> debug ( 'Looking up HandlerAdapter bean by name.' ) ; $ handlerAdapter = $ this -> initialContext -> lookup ( self :: HANDLER_ADAPTER_BEAN_NAME ) ; if ( $ handlerAdapter != null && $ handlerAdapter instanceof HandlerAdapter ) { $ this -> handlerAdapters = array ( $ handlerAdapter ) ; } } if ( empty ( $ this -> handlerAdapters ) ) { $ this -> logger -> warning ( 'Could not find any bean of type HandlerAdapter, falling back to default strategy.' ) ; $ this -> viewResolvers = $ this -> getDefaultStrategies ( "Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter" ) ; } }
Initialize the HandlerAdapters used by this class.
@return void
Initialize the HandlerAdapters used by this class .