summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsawa74 <yoann.kergall@gmail.com>2016-11-26 00:58:50 +0000
committerGitHub <noreply@github.com>2016-11-26 00:58:50 +0000
commitfaafc008bc72bcf5c6be3c697977e8d5209f2a75 (patch)
tree45fdb5f617d88ce246abe5bc83211e120d74ef14
parentb1fc3c7d99b71c1f6958aa437b58cce543a3db5a (diff)
downloadPHPAuth-faafc008bc72bcf5c6be3c697977e8d5209f2a75.zip
PHPAuth-faafc008bc72bcf5c6be3c697977e8d5209f2a75.tar.gz
PHPAuth-faafc008bc72bcf5c6be3c697977e8d5209f2a75.tar.bz2
Update Config.php
-rw-r--r--Config.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/Config.php b/Config.php
index 0294d40..773e780 100644
--- a/Config.php
+++ b/Config.php
@@ -28,10 +28,7 @@ class Config
$this->config = array();
$query = $this->dbh->query("SELECT * FROM {$this->config_table}");
-
- while($row = $query->fetch()) {
- $this->config[$row['setting']] = $row['value'];
- }
+ $this->config = $query->fetchAll(\PDO::FETCH_KEY_PAIR);
$this->setForgottenDefaults(); // Danger foreseen is half avoided.
}
@@ -48,6 +45,14 @@ class Config
}
/**
+ * @return array
+ */
+ public function getAll()
+ {
+ return $this->config;
+ }
+
+ /**
* Config::__set()
*
* @param mixed $setting