Prado\TApplication::initApplication PHP 메소드

initApplication() 보호된 메소드

Configuration file will be read and parsed (if a valid cached version exists, it will be used instead). Then, modules are created and initialized; Afterwards, the requested service is created and initialized.
protected initApplication ( )
    protected function initApplication()
    {
        Prado::trace('Initializing application', 'Prado\\TApplication');
        if ($this->_configFile !== null) {
            if ($this->_cacheFile === null || @filemtime($this->_cacheFile) < filemtime($this->_configFile)) {
                $config = new TApplicationConfiguration();
                $config->loadFromFile($this->_configFile);
                if ($this->_cacheFile !== null) {
                    file_put_contents($this->_cacheFile, serialize($config), LOCK_EX);
                }
            } else {
                $config = unserialize(file_get_contents($this->_cacheFile));
            }
            $this->applyConfiguration($config, false);
        }
        if (($serviceID = $this->getRequest()->resolveRequest(array_keys($this->_services))) === null) {
            $serviceID = $this->getPageServiceID();
        }
        $this->startService($serviceID);
    }