SimpleSAML\Database::__construct PHP Method

__construct() private method

Private constructor that restricts instantiation to getInstance().
private __construct ( SimpleSAML_Configuration $config )
$config SimpleSAML_Configuration Instance of the SimpleSAML_Configuration class
    private function __construct($config)
    {
        $driverOptions = $config->getArray('database.driver_options', array());
        if ($config->getBoolean('database.persistent', true)) {
            $driverOptions = array(\PDO::ATTR_PERSISTENT => true);
        }
        // connect to the master
        $this->dbMaster = $this->connect($config->getString('database.dsn'), $config->getString('database.username', null), $config->getString('database.password', null), $driverOptions);
        // connect to any configured slaves
        $slaves = $config->getArray('database.slaves', array());
        if (count($slaves >= 1)) {
            foreach ($slaves as $slave) {
                array_push($this->dbSlaves, $this->connect($slave['dsn'], $slave['username'], $slave['password'], $driverOptions));
            }
        }
        $this->tablePrefix = $config->getString('database.prefix', '');
    }