/** * Setter for Lithium instance * * @param Lithium $oLithium */ public static function setLithium($oLithium) { self::$oLithium = $oLithium; }
/** * Set up class properties etc. */ private function Setup() { // place for additional sets // e.g. $this->aConfig[ section_key ][ value_key ] = value $sAppConfigIni = DOCROOT . $this->oConfig->getValue(sprintf('applications.%s.config_file', $this->oRouter->getApplicationName())); $this->oConfig->loadIniFile($sAppConfigIni); $this->sLogsDirectory = $this->getConfig('General.Logs_directory', DOCROOT . 'logs/'); $this->sLogsDirectory .= date('Y-m-d') . '/'; // set main framework path $this->addPath('Lithium'); // set application path received from config file if ($sAppPath = $this->getConfig('General.App_path')) { $this->addPath($sAppPath); Loader::addPath(DOCROOT . $sAppPath); } // add path for external classes Loader::addPath(DOCROOT); // set language if ($sLanguage = $this->getConfig('Locale.Language')) { $this->sLanguage = $sLanguage; } Core_Model::setLithium($this); Core_Driver::setLithium($this); // set router configs and initialize it $this->oRouter->addConfig($this->getConfig('Router')); $this->oRouter->init(); View::setRouter($this->oRouter); Module_Sorter::setRouter($this->oRouter); Module_Pagination::setRouter($this->oRouter); }