Skip to content
Snippets Groups Projects
Commit 551e19dc authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Minor fixes in comments and phpdocs.

parent b63c5c71
No related branches found
No related tags found
No related merge requests found
......@@ -60,12 +60,12 @@ class Database
$config = ($altConfig) ? $altConfig : \SimpleSAML_Configuration::getInstance();
$instanceId = self::generateInstanceId($config);
/* Check if we already have initialized the session. */
// check if we already have initialized the session
if (isset(self::$instance[$instanceId])) {
return self::$instance[$instanceId];
}
/* Create a new session. */
// create a new session
self::$instance[$instanceId] = new Database($config);
return self::$instance[$instanceId];
}
......@@ -83,7 +83,7 @@ class Database
$driverOptions = array(\PDO::ATTR_PERSISTENT => true);
}
// Connect to the master
// connect to the master
$this->dbMaster = $this->connect(
$config->getString('database.dsn'),
$config->getString('database.username', null),
......@@ -91,7 +91,7 @@ class Database
$driverOptions
);
// Connect to any configured slaves
// connect to any configured slaves
$slaves = $config->getArray('database.slaves', array());
if (count($slaves >= 1)) {
foreach ($slaves as $slave) {
......
......@@ -51,22 +51,18 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_
* This constructor initializes the PDO metadata storage handler with the specified
* configuration. The configuration is an associative array with the following
* possible elements (set in config.php):
* - 'usePersistentConnection': TRUE/FALSE if database connection should be
* persistent.
*
* - 'dsn': The database connection string.
*
* - 'usePersistentConnection': TRUE/FALSE if database connection should be persistent.
* - 'dsn': The database connection string.
* - 'username': Database user name
*
* - 'password': Password for the database user.
*
* @param array $config An associtive array with the configuration for this handler.
* @param array $config An associative array with the configuration for this handler.
*/
public function __construct($config)
{
assert('is_array($config)');
$this->db = SimpleSAML\Database::getInstance();
$this->db = SimpleSAML\Database::getInstance($config);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment