ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Functions | |
CAS_PGTStorage_Db::_getPdo () | |
This method returns the PDO object to use for database interactions. More... | |
CAS_PGTStorage_Db::_getTable () | |
This method returns the table to use when storing/retrieving PGT's. More... | |
CAS_PGTStorage_Db::getStorageType () | |
This method returns an informational string giving the type of storage used by the object (used for debugging purposes). More... | |
CAS_PGTStorage_Db::getStorageInfo () | |
This method returns an informational string giving informations on the parameters of the storage. More... | |
CAS_PGTStorage_Db::__construct ( $cas_parent, $dsn_or_pdo, $username='', $password='', $table='', $driver_options=null) | |
The class constructor. More... | |
CAS_PGTStorage_Db::init () | |
This method is used to initialize the storage. More... | |
CAS_PGTStorage_Db::_setErrorMode () | |
This method will enable the Exception error mode on the PDO object. More... | |
CAS_PGTStorage_Db::_resetErrorMode () | |
this method will reset the error mode on the PDO object More... | |
CAS_PGTStorage_Db::createTableSql () | |
This method returns the query used to create a pgt storage table. More... | |
CAS_PGTStorage_Db::storePgtSql () | |
This method returns the query used to store a pgt. More... | |
CAS_PGTStorage_Db::retrievePgtSql () | |
This method returns the query used to retrieve a pgt. More... | |
CAS_PGTStorage_Db::deletePgtSql () | |
This method returns the query used to delete a pgt. More... | |
CAS_PGTStorage_Db::createTable () | |
This method creates the database table used to store pgt's and pgtiou's. More... | |
CAS_PGTStorage_Db::write ($pgt, $pgt_iou) | |
This method stores a PGT and its corresponding PGT Iou in the database. More... | |
CAS_PGTStorage_Db::read ($pgt_iou) | |
This method reads a PGT corresponding to a PGT Iou and deletes the corresponding db entry. More... | |
Variables | |
CAS_PGTStorage_Db::$_pdo | |
the PDO object to use for database interactions More... | |
CAS_PGTStorage_Db::$_dsn | |
database connection options to use when creating a new PDO object More... | |
CAS_PGTStorage_Db::$_username | |
CAS_PGTStorage_Db::$_password | |
CAS_PGTStorage_Db::$_table_options | |
CAS_PGTStorage_Db::$_table | |
the table to use for storing/retrieving pgt's More... | |
CAS_PGTStorage_Db::$_errMode | |
attribute that stores the previous error mode for the PDO handle while processing a transaction More... | |
CAS_PGTStorage_Db::__construct | ( | $cas_parent, | |
$dsn_or_pdo, | |||
$username = '' , |
|||
$password = '' , |
|||
$table = '' , |
|||
$driver_options = null |
|||
) |
The class constructor.
CAS_Client | $cas_parent | the CAS_Client instance that creates the object. |
string | $dsn_or_pdo | a dsn string to use for creating a PDO object or a PDO object |
string | $username | the username to use when connecting to the database |
string | $password | the password to use when connecting to the database |
string | $table | the table to use for storing and retrieving PGT's |
string | $driver_options | any driver options to use when connecting to the database |
Definition at line 138 of file Db.php.
References $password, $table, array, CAS_PGT_STORAGE_DB_DEFAULT_TABLE, phpCAS\traceBegin(), and phpCAS\traceEnd().
|
private |
This method returns the PDO object to use for database interactions.
Definition at line 63 of file Db.php.
References CAS_PGTStorage_Db\$_pdo.
Referenced by CAS_PGTStorage_Db\_resetErrorMode(), CAS_PGTStorage_Db\_setErrorMode(), CAS_PGTStorage_Db\createTable(), CAS_PGTStorage_Db\read(), and CAS_PGTStorage_Db\write().
|
private |
This method returns the table to use when storing/retrieving PGT's.
Definition at line 86 of file Db.php.
References CAS_PGTStorage_Db\$_table.
Referenced by CAS_PGTStorage_Db\createTableSql(), CAS_PGTStorage_Db\deletePgtSql(), CAS_PGTStorage_Db\retrievePgtSql(), and CAS_PGTStorage_Db\storePgtSql().
|
private |
this method will reset the error mode on the PDO object
Definition at line 234 of file Db.php.
References CAS_PGTStorage_Db\_getPdo().
Referenced by CAS_PGTStorage_Db\createTable(), CAS_PGTStorage_Db\read(), and CAS_PGTStorage_Db\write().
|
private |
This method will enable the Exception error mode on the PDO object.
Definition at line 221 of file Db.php.
References CAS_PGTStorage_Db\_getPdo().
Referenced by CAS_PGTStorage_Db\createTable(), CAS_PGTStorage_Db\read(), and CAS_PGTStorage_Db\write().
CAS_PGTStorage_Db::createTable | ( | ) |
This method creates the database table used to store pgt's and pgtiou's.
Definition at line 303 of file Db.php.
References $query, CAS_PGTStorage_Db\_getPdo(), CAS_PGTStorage_Db\_resetErrorMode(), CAS_PGTStorage_Db\_setErrorMode(), phpCAS\error(), CAS_PGTStorage_Db\init(), CAS_PGTStorage_AbstractStorage\isInitialized(), phpCAS\traceBegin(), and phpCAS\traceEnd().
|
protected |
This method returns the query used to create a pgt storage table.
Definition at line 253 of file Db.php.
References CAS_PGTStorage_Db\_getTable().
|
protected |
This method returns the query used to delete a pgt.
Definition at line 289 of file Db.php.
References CAS_PGTStorage_Db\_getTable().
Referenced by CAS_PGTStorage_Db\read().
CAS_PGTStorage_Db::getStorageInfo | ( | ) |
CAS_PGTStorage_Db::getStorageType | ( | ) |
CAS_PGTStorage_Db::init | ( | ) |
This method is used to initialize the storage.
Halts on error.
Definition at line 179 of file Db.php.
References phpCAS\error(), CAS_PGTStorage_AbstractStorage\isInitialized(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by CAS_PGTStorage_Db\createTable().
CAS_PGTStorage_Db::read | ( | $pgt_iou | ) |
This method reads a PGT corresponding to a PGT Iou and deletes the corresponding db entry.
string | $pgt_iou | the PGT iou |
Definition at line 392 of file Db.php.
References $query, CAS_PGTStorage_Db\_getPdo(), CAS_PGTStorage_Db\_resetErrorMode(), CAS_PGTStorage_Db\_setErrorMode(), CAS_PGTStorage_Db\deletePgtSql(), CAS_PGTStorage_Db\retrievePgtSql(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().
|
protected |
This method returns the query used to retrieve a pgt.
the first column of the first row should contain the pgt
Definition at line 278 of file Db.php.
References CAS_PGTStorage_Db\_getTable().
Referenced by CAS_PGTStorage_Db\read().
|
protected |
This method returns the query used to store a pgt.
Definition at line 265 of file Db.php.
References CAS_PGTStorage_Db\_getTable().
Referenced by CAS_PGTStorage_Db\write().
CAS_PGTStorage_Db::write | ( | $pgt, | |
$pgt_iou | |||
) |
This method stores a PGT and its corresponding PGT Iou in the database.
Echoes a warning on error.
string | $pgt | the PGT |
string | $pgt_iou | the PGT iou |
Definition at line 349 of file Db.php.
References $query, CAS_PGTStorage_Db\_getPdo(), CAS_PGTStorage_Db\_resetErrorMode(), CAS_PGTStorage_Db\_setErrorMode(), phpCAS\error(), CAS_PGTStorage_Db\storePgtSql(), phpCAS\traceBegin(), and phpCAS\traceEnd().
|
private |
|
private |
|
private |
the PDO object to use for database interactions
Definition at line 56 of file Db.php.
Referenced by CAS_PGTStorage_Db\_getPdo().
|
private |
the table to use for storing/retrieving pgt's
Definition at line 79 of file Db.php.
Referenced by CAS_PGTStorage_Db\_getTable().