config($file); // Load database schema. $schema = $this->config('schemas/'. $config['database'] .'.yaml'); } catch (Exception $e) { echo '[cinisis] caught exception: ', $e->getMessage(), "\n"; return FALSE; } // Setup database connection. $this->implementation = $config['implementation'] .'Db'; $this->db = new $this->implementation($schema); } /** * Config file load. * * @param $file * Config file. * * @return * Array with configuration. */ function config($file) { if (!file_exists($file)) { throw new Exception('Config '. $file .' not found.'); } // Load configuration. return Spyc::YAMLLoad($file); } }