|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Inheritance diagram for sspmod_consent_Consent_Store_Database:
Collaboration diagram for sspmod_consent_Consent_Store_Database: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... | |
| _createTable () | |
| Create consent table. 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... | |
| $_table | |
| Table with consent. More... | |
| $_timeout = NULL | |
| $_db | |
| Database handle. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from sspmod_consent_Store | |
| static | parseStoreConfig ($config) |
| Parse consent storage configuration. More... | |
Protected Member Functions inherited from sspmod_consent_Store | |
| __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 69 of file Database.php.
References $config.
| sspmod_consent_Consent_Store_Database::__sleep | ( | ) |
Called before serialization.
Definition at line 125 of file Database.php.
|
private |
Create consent table.
This function creates the table with consent data.
@TODO Remove this function since it is not used
Definition at line 436 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 337 of file Database.php.
References _getDB(), and SimpleSAML\Logger\error().
Referenced by deleteAllConsents(), deleteConsent(), getConsents(), hasConsent(), and saveConsent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Format PDO error.
This function formats a PDO error, as returned from errorInfo.
| array | $error | The error information. |
Definition at line 488 of file Database.php.
|
private |
Get database handle.
Definition at line 462 of file Database.php.
Referenced by _execute().
Here is the caller graph for this function:| sspmod_consent_Consent_Store_Database::deleteAllConsents | ( | $userId | ) |
Delete all consents.
| string | $userId | The hash identifying the user at an IdP. |
Reimplemented from sspmod_consent_Store.
Definition at line 271 of file Database.php.
References _execute(), SimpleSAML\Logger\debug(), and SimpleSAML\Logger\warning().
Here is the call graph for this function:| 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. |
Reimplemented from sspmod_consent_Store.
Definition at line 239 of file Database.php.
References _execute(), SimpleSAML\Logger\debug(), and SimpleSAML\Logger\warning().
Here is the call graph for this function:| 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. |
Reimplemented from sspmod_consent_Store.
Definition at line 302 of file Database.php.
References $ret, $row, and _execute().
Here is the call graph for this function:| sspmod_consent_Consent_Store_Database::getStatistics | ( | ) |
Get statistics from the database.
The returned array contains 3 entries
Reimplemented from sspmod_consent_Store.
Definition at line 379 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. |
Reimplemented from sspmod_consent_Store.
Definition at line 151 of file Database.php.
References _execute(), and SimpleSAML\Logger\debug().
Here is the call graph for this function:| 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. |
Reimplemented from sspmod_consent_Store.
Definition at line 191 of file Database.php.
References _execute(), and SimpleSAML\Logger\debug().
Here is the call graph for this function:| sspmod_consent_Consent_Store_Database::selftest | ( | ) |
A quick selftest of the consent database.
Definition at line 502 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 |
Password for the database;.
Definition at line 38 of file Database.php.
|
private |
Table with consent.
Definition at line 43 of file Database.php.
|
private |
Definition at line 50 of file Database.php.
|
private |
Username for the database.
Definition at line 33 of file Database.php.