Example #1
0
 public function load($repRacine = '', $doNothing = false)
 {
     $this->repRacine = $repRacine;
     if (!defined('REP_RACINE')) {
         define('REP_RACINE', $repRacine);
     }
     if ($doNothing) {
         return;
     }
     if (!$this->_loadConfig()) {
         throw new Exception('Site:Site() - _loadConfig() failed');
     }
     if (!$this->addLibFile('Chrono')) {
         throw new Exception('Site:Site() - addModel(\'Chrono\') failed');
     }
     if (!$this->_startTime()) {
         throw new Exception('Site:Site() - _startTime() failed');
     }
     if (!$this->_loadDefaultClasses()) {
         throw new Exception('Site:Site() - _loadDefaultClasses() failed for file ' . $errClass);
     }
     $this->timeMgr->markTime('Default classes loaded. Will connect to DB.');
     if ($this->config->useDb()) {
         if (!$this->_connectDb()) {
             throw new Exception('Site:Site() - _connectDb() failed');
         }
         $this->timeMgr->markTime('Connected to DB.');
     }
     Config::setConf($this->config);
 }