diff options
author | sawa74 <yoann.kergall@gmail.com> | 2016-11-26 00:58:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-26 00:58:50 +0000 |
commit | faafc008bc72bcf5c6be3c697977e8d5209f2a75 (patch) | |
tree | 45fdb5f617d88ce246abe5bc83211e120d74ef14 | |
parent | b1fc3c7d99b71c1f6958aa437b58cce543a3db5a (diff) | |
download | PHPAuth-faafc008bc72bcf5c6be3c697977e8d5209f2a75.zip PHPAuth-faafc008bc72bcf5c6be3c697977e8d5209f2a75.tar.gz PHPAuth-faafc008bc72bcf5c6be3c697977e8d5209f2a75.tar.bz2 |
Update Config.php
-rw-r--r-- | Config.php | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 |