ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($config) | |
Parse configuration. More... | |
__sleep () | |
Called before serialization. More... | |
hasConsent ($userId, $destinationId, $attributeSet) | |
Check for consent. More... | |
saveConsent ($userId, $destinationId, $attributeSet) | |
Save consent. More... | |
deleteConsent ($userId, $destinationId) | |
Delete consent. More... | |
deleteAllConsents ($userId) | |
Delete all consents. More... | |
getConsents ($userId) | |
Retrieve consents. More... | |
getStatistics () | |
Get statistics from the database. More... | |
selftest () | |
A quick selftest of the consent database. More... | |
![]() | |
hasConsent ($userId, $destinationId, $attributeSet) | |
Check for consent. More... | |
saveConsent ($userId, $destinationId, $attributeSet) | |
Save consent. More... | |
deleteConsent ($userId, $destinationId) | |
Delete consent. More... | |
deleteAllConsents ($userId) | |
Delete all consents. More... | |
getStatistics () | |
Get statistics for all consent given in the consent store. More... | |
getConsents ($userId) | |
Retrieve consents. More... | |
Private Member Functions | |
_execute ($statement, $parameters) | |
Prepare and execute statement. More... | |
_getDB () | |
Get database handle. More... | |
Static Private Member Functions | |
static | _formatError ($error) |
Format PDO error. More... | |
Private Attributes | |
$_dsn | |
DSN for the database. More... | |
$_dateTime | |
The DATETIME SQL function to use. More... | |
$_username | |
Username for the database. More... | |
$_password | |
Password for the database;. More... | |
$_options | |
Options for the database;. More... | |
$_table | |
Table with consent. More... | |
$_timeout = null | |
$_db | |
Database handle. More... | |
Additional Inherited Members | |
![]() | |
static | parseStoreConfig ($config) |
Parse consent storage configuration. More... | |
![]() | |
__construct (&$config) | |
Constructor for the base class. More... | |
Definition at line 18 of file Database.php.
sspmod_consent_Consent_Store_Database::__construct | ( | $config | ) |
Parse configuration.
This constructor parses the configuration.
array | $config | Configuration for database consent store. |
Exception | in case of a configuration error. |
Definition at line 74 of file Database.php.
References $config.
sspmod_consent_Consent_Store_Database::__sleep | ( | ) |
Called before serialization.
Definition at line 137 of file Database.php.
|
private |
Prepare and execute statement.
This function prepares and executes a statement. On error, false will be returned.
string | $statement | The statement which should be executed. |
array | $parameters | Parameters for the statement. |
Definition at line 349 of file Database.php.
References _getDB(), and SimpleSAML\Logger\error().
Referenced by deleteAllConsents(), deleteConsent(), getConsents(), hasConsent(), and saveConsent().
|
staticprivate |
Format PDO error.
This function formats a PDO error, as returned from errorInfo.
array | $error | The error information. |
Definition at line 474 of file Database.php.
|
private |
Get database handle.
Definition at line 443 of file Database.php.
Referenced by _execute().
sspmod_consent_Consent_Store_Database::deleteAllConsents | ( | $userId | ) |
Delete all consents.
string | $userId | The hash identifying the user at an IdP. |
Definition at line 283 of file Database.php.
References _execute(), SimpleSAML\Logger\debug(), and SimpleSAML\Logger\warning().
sspmod_consent_Consent_Store_Database::deleteConsent | ( | $userId, | |
$destinationId | |||
) |
Delete consent.
Called when a user revokes consent for a given destination.
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifies the destination. |
Definition at line 251 of file Database.php.
References _execute(), SimpleSAML\Logger\debug(), and SimpleSAML\Logger\warning().
sspmod_consent_Consent_Store_Database::getConsents | ( | $userId | ) |
Retrieve consents.
This function should return a list of consents the user has saved.
string | $userId | The hash identifying the user at an IdP. |
Definition at line 314 of file Database.php.
References $ret, $row, and _execute().
sspmod_consent_Consent_Store_Database::getStatistics | ( | ) |
Get statistics from the database.
The returned array contains 3 entries
Definition at line 390 of file Database.php.
sspmod_consent_Consent_Store_Database::hasConsent | ( | $userId, | |
$destinationId, | |||
$attributeSet | |||
) |
Check for consent.
This function checks whether a given user has authorized the release of the attributes identified by $attributeSet from $source to $destination.
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifies the destination. |
string | $attributeSet | A hash which identifies the attributes. |
Definition at line 163 of file Database.php.
References _execute(), and SimpleSAML\Logger\debug().
sspmod_consent_Consent_Store_Database::saveConsent | ( | $userId, | |
$destinationId, | |||
$attributeSet | |||
) |
Save consent.
Called when the user asks for the consent to be saved. If consent information for the given user and destination already exists, it should be overwritten.
string | $userId | The hash identifying the user at an IdP. |
string | $destinationId | A string which identifies the destination. |
string | $attributeSet | A hash which identifies the attributes. |
Definition at line 203 of file Database.php.
References _execute(), and SimpleSAML\Logger\debug().
sspmod_consent_Consent_Store_Database::selftest | ( | ) |
A quick selftest of the consent database.
Definition at line 488 of file Database.php.
|
private |
The DATETIME SQL function to use.
Definition at line 28 of file Database.php.
|
private |
|
private |
DSN for the database.
Definition at line 23 of file Database.php.
|
private |
Options for the database;.
Definition at line 43 of file Database.php.
|
private |
Password for the database;.
Definition at line 38 of file Database.php.
|
private |
Table with consent.
Definition at line 48 of file Database.php.
|
private |
Definition at line 55 of file Database.php.
|
private |
Username for the database.
Definition at line 33 of file Database.php.