summaryrefslogtreecommitdiff
path: root/idiorm.php
diff options
context:
space:
mode:
Diffstat (limited to 'idiorm.php')
-rw-r--r--idiorm.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/idiorm.php b/idiorm.php
index 013eacf..09b211c 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -197,6 +197,19 @@
}
/**
+ * Retrieve configuration options by key, or as whole array.
+ * @param string $key
+ * @param string $connection_name Which connection to use
+ */
+ public static function get_config($key = null, $connection_name = self::DEFAULT_CONNECTION) {
+ if ($key) {
+ return self::$_config[$connection_name][$key];
+ } else {
+ return self::$_config[$connection_name];
+ }
+ }
+
+ /**
* Despite its slightly odd name, this is actually the factory
* method used to acquire instances of the class. It is named
* this way for the sake of a readable interface, ie