Phpauth\Config::__construct PHP Method

__construct() public method

Config::__construct()
public __construct ( PDO $dbh, string $config_table = 'config' )
$dbh PDO
$config_table string
    public function __construct(\PDO $dbh, $config_table = 'config')
    {
        $this->dbh = $dbh;
        if (func_num_args() > 1) {
            $this->config_table = $config_table;
        }
        $this->config = array();
        $query = $this->dbh->query("SELECT * FROM {$this->config_table}");
        $this->config = $query->fetchAll(\PDO::FETCH_KEY_PAIR);
        $this->setForgottenDefaults();
        // Danger foreseen is half avoided.
    }