aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-07-23 17:46:29 -0300
committerSilvio <silvio@devlet.com.br>2010-07-23 17:46:29 -0300
commitf4243f1d6d01e05c374dfaf78a0ff96f95e33765 (patch)
tree91468f62a483c8efd4dac0174fbf410fa8aae888
parentc33739f87ebf10e494f3c4d16ef4d53876f044f2 (diff)
downloadcinisis-f4243f1d6d01e05c374dfaf78a0ff96f95e33765.tar.gz
cinisis-f4243f1d6d01e05c374dfaf78a0ff96f95e33765.tar.bz2
New method open() at IsisConnector
-rw-r--r--classes/IsisConnector.php14
1 files 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();