/** * Constructor * * @param string $configFile Path to .ini config file * @param string $writableFolder Path to folder with write permissions */ public function __construct($configFile, $writableFolder) { AppConfig::load($configFile); if (!is_writable($writableFolder)) { throw new \Exception('Folder is not writable'); } date_default_timezone_set(AppConfig::get('datetime', 'timezone', 'GMT')); $this->slim = $this->createSlim(); $this->template = FactoryLoader::load('Template', FALSE, $writableFolder); $this->init(); }