From f6f1d270419bbd9696974719b15b8c01b19b032b Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 6 Apr 2010 14:05:07 -0300 Subject: Config parse and check --- classes/CinIsis.php | 62 ----------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 classes/CinIsis.php (limited to 'classes/CinIsis.php') diff --git a/classes/CinIsis.php b/classes/CinIsis.php deleted file mode 100644 index ff1de68..0000000 --- a/classes/CinIsis.php +++ /dev/null @@ -1,62 +0,0 @@ -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); - } -} -- cgit v1.2.3