aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-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();