/** * Constructor * * @param string $file */ public function __construct($file) { if (file_exists($file) && is_readable($file)) { $this->_config = (include $file); } else { die('ERROR: Config file not found ' . $file); } $this->setDB(); Service::set('config', $this->_config); Service::set('session', new Session()); Service::set('security', new Security()); Service::set('request', new Request()); Service::set('app', $this); self::$app = $this; }