Example #1
0
 public function __construct()
 {
     $this->routes = Settings::Get('routes')->Values(['routes']);
     $this->max_route_attempts = Settings::Get()->Value(['origin', 'max_route_attempts']);
     if (!$this->routes->offsetExists('*')) {
         throw new Exception('You must specify a default route in your routes file.');
     }
     if (!$this->routes->offsetExists('404')) {
         throw new Exception('You must specify a 404 route in your routes file.');
     }
 }
Example #2
0
 public function __construct($database_name = null)
 {
     if ($database_name === null) {
         throw new Exception('Invalid database name passed. Please check the call and try again.');
     }
     $this->connection_parameters = Settings::Get('databases')->Values([$database_name]);
     if (!$this->Connect()) {
         throw new Exception('Unable to connect to database: ' . $database_name . ' - ' . $this->error);
     }
 }
Example #3
0
 public function __construct($file = null)
 {
     $this->generic_log_file = Settings::Get('settings')->Value(['origin', 'generic_log_file']);
     $this->minimum_log_level = (int) Settings::Get('settings')->Value(['origin', 'log_level']);
     $this->file = $file === null ? 'log.log' : $file . '.log';
 }