From f4243f1d6d01e05c374dfaf78a0ff96f95e33765 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 23 Jul 2010 17:46:29 -0300 Subject: New method open() at IsisConnector --- classes/IsisConnector.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/classes/IsisConnector.php b/classes/IsisConnector.php index c0fd3fc..4d9683f 100644 --- a/classes/IsisConnector.php +++ b/classes/IsisConnector.php @@ -8,8 +8,18 @@ class IsisConnector { /** * Constructor. */ - public function __construct() { - $this->isis = new CinisisDb(); + public function __construct($config = null) { + return $this->open($config); + } + + /** + * Open a database. + * + * @param $config + * Config file or array. + */ + public function open($config) { + $this->isis = new CinisisDb($config); if ($this->isis->db) { $this->entries = $this->isis->db->entries(); -- cgit v1.2.3