protected function _actionLoad($context)
    {
        //already loaded
        if ($this->_application instanceof ComApplication) {
            return;
        }

        //register exception handler
        set_exception_handler(array($this, 'exception'));

        $identifier = clone $this->getIdentifier();
        $identifier->name = 'application';
        $this->getService('anahita:loader')->loadIdentifier($identifier);

        //no need to create session when using CLI (command line interface)
        $session = (PHP_SAPI == 'cli') ? false : true;

        $this->_application = $this->getService('com:application', array('session' => $session));

        $settings = $this->getService('com:settings.setting');

        $this->getService('anahita:language', array(
            'language' => $settings->language
        ));

        $error_reporting = $settings->error_reporting;

        if ($error_reporting > 0) {
            error_reporting($error_reporting);
            ini_set('display_errors', 1);
            ini_set('display_startup_errors', 1);
        }

        define('ANDEBUG', $settings->debug);

        //set the default timezone to UTC
        date_default_timezone_set('UTC');

        AnRequest::root(str_replace('/'.$this->_application->getName(), '', AnRequest::base()));
    }
protected function _actionLoad($context)
    {
        //already loaded
        if ($this->_application instanceof ComApplication) {
            return;
        }

        //register exception handler
        set_exception_handler(array($this, 'exception'));

        $identifier = clone $this->getIdentifier();
        $identifier->name = 'application';
        $this->getService('anahita:loader')->loadIdentifier($identifier);

        //no need to create session when using CLI (command line interface)
        $session = (PHP_SAPI == 'cli') ? false : true;

        $this->_application = $this->getService('com:application', array('session' => $session));

        $settings = $this->getService('com:settings.setting');

        $this->getService('anahita:language', array(
            'language' => $settings->language
        ));

        $error_reporting = $settings->error_reporting;

        if ($error_reporting > 0) {
            error_reporting($error_reporting);
            ini_set('display_errors', 1);
            ini_set('display_startup_errors', 1);
        }

        define('ANDEBUG', $settings->debug);

        //set the default timezone to UTC
        date_default_timezone_set('UTC');

        AnRequest::root(str_replace('/'.$this->_application->getName(), '', AnRequest::base()));
    }
protected function _actionLoad ( $ context ) { //already loaded if ( $ this -> _application instanceof ComApplication ) { return ; } //register exception handler set_exception_handler ( array ( $ this , 'exception' ) ) ; $ identifier = clone $ this -> getIdentifier ( ) ; $ identifier -> name = 'application' ; $ this -> getService ( 'anahita:loader' ) -> loadIdentifier ( $ identifier ) ; //no need to create session when using CLI (command line interface) $ session = ( PHP_SAPI == 'cli' ) ? false : true ; $ this -> _application = $ this -> getService ( 'com:application' , array ( 'session' => $ session ) ) ; $ settings = $ this -> getService ( 'com:settings.setting' ) ; $ this -> getService ( 'anahita:language' , array ( 'language' => $ settings -> language ) ) ; $ error_reporting = $ settings -> error_reporting ; if ( $ error_reporting > 0 ) { error_reporting ( $ error_reporting ) ; ini_set ( 'display_errors' , 1 ) ; ini_set ( 'display_startup_errors' , 1 ) ; } define ( 'ANDEBUG' , $ settings -> debug ) ; //set the default timezone to UTC date_default_timezone_set ( 'UTC' ) ; AnRequest :: root ( str_replace ( '/' . $ this -> _application -> getName ( ) , '' , AnRequest :: base ( ) ) ) ; }
Loads the application.
Loads the application .