Exemplo n.º 1
0
 /**
  * Constructor: initiates and project and runs it
  */
 public function __construct()
 {
     XRay::handlers();
     if ($this->start()) {
         $this->run();
     }
 }
Exemplo n.º 2
0
 /**
  * Load the configuration file
  * 
  * @param array $default default configuration data
  * @return boolean
  */
 public static function load(array $default)
 {
     try {
         self::loadConfig(!empty($default['create_config']), $default);
     } catch (\Exception $e) {
         Debug::report("Not able to load the config");
         XRay::handleException($e);
         return false;
     }
     Debug::report("config read: " . json_encode(self::$config));
     self::$config = array_merge($default, self::$config);
     Debug::report("config merged: " . json_encode(self::$config));
     return true;
 }