src/Web/Servlet/DispatcherServlet.php
public function init(ServletConfigInterface $servletConfig)
    {
        parent::init($servletConfig);
        $this->applicationContext = $this->getServletContext()->getApplication();
        $this->initialContext = new InitialContext();
        $this->initialContext->injectApplication($this->applicationContext);
        $this->logger = $this->applicationContext->getInitialContext()->getSystemLogger();
        $this->logger->debug('Initializing Servlet '.str_replace("\n", " - ", $this->servletInfo));
        if (file_exists(__DIR__."/DispatcherServlet.properties") && is_readable(__DIR__."/DispatcherServlet.properties")) {
            $this->defaultStrategies = new Properties();
            try {
                $this->defaultStrategies->load(__DIR__."/DispatcherServlet.properties");
            } catch (PropertyFileParseException $exc) {
                $this->logger->error("Could not read default strategies");
            }
        }
        $this->initStrategies();
    }
public function init(ServletConfigInterface $servletConfig)
    {
        parent::init($servletConfig);
        $this->applicationContext = $this->getServletContext()->getApplication();
        $this->initialContext = new InitialContext();
        $this->initialContext->injectApplication($this->applicationContext);
        $this->logger = $this->applicationContext->getInitialContext()->getSystemLogger();
        $this->logger->debug('Initializing Servlet '.str_replace("\n", " - ", $this->servletInfo));
        if (file_exists(__DIR__."/DispatcherServlet.properties") && is_readable(__DIR__."/DispatcherServlet.properties")) {
            $this->defaultStrategies = new Properties();
            try {
                $this->defaultStrategies->load(__DIR__."/DispatcherServlet.properties");
            } catch (PropertyFileParseException $exc) {
                $this->logger->error("Could not read default strategies");
            }
        }
        $this->initStrategies();
    }
public function init ( ServletConfigInterface $ servletConfig ) { parent :: init ( $ servletConfig ) ; $ this -> applicationContext = $ this -> getServletContext ( ) -> getApplication ( ) ; $ this -> initialContext = new InitialContext ( ) ; $ this -> initialContext -> injectApplication ( $ this -> applicationContext ) ; $ this -> logger = $ this -> applicationContext -> getInitialContext ( ) -> getSystemLogger ( ) ; $ this -> logger -> debug ( 'Initializing Servlet ' . str_replace ( "\n" , " - " , $ this -> servletInfo ) ) ; if ( file_exists ( __DIR__ . "/DispatcherServlet.properties" ) && is_readable ( __DIR__ . "/DispatcherServlet.properties" ) ) { $ this -> defaultStrategies = new Properties ( ) ; try { $ this -> defaultStrategies -> load ( __DIR__ . "/DispatcherServlet.properties" ) ; } catch ( PropertyFileParseException $ exc ) { $ this -> logger -> error ( "Could not read default strategies" ) ; } } $ this -> initStrategies ( ) ; }
Overridden init function to initialize application context
@param ServletConfigInterface $servletConfig The servlet config
@return void
Overridden init function to initialize application context