ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
PGT storage
+ Collaboration diagram for PGT storage:

Functions

 phpCAS::setPGTStorageFile ($format= '', $path= '')
 This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem.
 phpCAS::setPGTStorageDB ($user, $password, $database_type= '', $hostname= '', $port=0, $database= '', $table= '')
 This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database.

Variables

const CAS_PGT_STORAGE_FILE_DEFAULT_PATH = '/tmp'
 Default path used when storing PGT's to file.
const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN = 'plain'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files
const CAS_PGT_STORAGE_FILE_FORMAT_XML = 'xml'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files
const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT = CAS_PGT_STORAGE_FILE_FORMAT_PLAIN
 Default format used when storing PGT's to file.
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE = 'mysql'
 default database type when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME = 'localhost'
 default host when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_PORT = ''
 default port when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE = 'phpCAS'
 default database when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_TABLE = 'pgt'
 default table when storing PGT's to database
const CAS_PGT_STORAGE_FILE_DEFAULT_PATH = '/tmp'
 Default path used when storing PGT's to file.
const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN = 'plain'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files
const CAS_PGT_STORAGE_FILE_FORMAT_XML = 'xml'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files
const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT = CAS_PGT_STORAGE_FILE_FORMAT_PLAIN
 Default format used when storing PGT's to file.
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE = 'mysql'
 default database type when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME = 'localhost'
 default host when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_PORT = ''
 default port when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE = 'phpCAS'
 default database when storing PGT's to database
const CAS_PGT_STORAGE_DB_DEFAULT_TABLE = 'pgt'
 default table when storing PGT's to database

Detailed Description

Function Documentation

phpCAS::setPGTStorageDB (   $user,
  $password,
  $database_type = '',
  $hostname = '',
  $port = 0,
  $database = '',
  $table = '' 
)

This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database.

Note
The connection to the database is done only when needed. As a consequence, bad parameters are detected only when initializing PGT storage, except in debug mode.
Parameters
$userthe user to access the data with
$passwordthe user's password
$database_typethe type of the database hosting the data
$hostnamethe server hosting the database
$portthe port the server is listening on
$databasethe name of the database
$tablethe name of the table storing the data

Definition at line 768 of file CAS.php.

References $PHPCAS_AUTH_CHECK_CALL, $PHPCAS_CLIENT, $user, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

{
if (!is_object($PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!$PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if ($PHPCAS_AUTH_CHECK_CALL['done']) {
phpCAS :: error('this method should only be called before ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() (called at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ')');
}
if (gettype($user) != 'string') {
phpCAS :: error('type mismatched for parameter $user (should be `string\')');
}
if (gettype($password) != 'string') {
phpCAS :: error('type mismatched for parameter $password (should be `string\')');
}
if (gettype($database_type) != 'string') {
phpCAS :: error('type mismatched for parameter $database_type (should be `string\')');
}
if (gettype($hostname) != 'string') {
phpCAS :: error('type mismatched for parameter $hostname (should be `string\')');
}
if (gettype($port) != 'integer') {
phpCAS :: error('type mismatched for parameter $port (should be `integer\')');
}
if (gettype($database) != 'string') {
phpCAS :: error('type mismatched for parameter $database (should be `string\')');
}
if (gettype($table) != 'string') {
phpCAS :: error('type mismatched for parameter $table (should be `string\')');
}
$PHPCAS_CLIENT->setPGTStorageDB($user, $password, $database_type, $hostname, $port, $database, $table);
}

+ Here is the call graph for this function:

phpCAS::setPGTStorageFile (   $format = '',
  $path = '' 
)

This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem.

Parameters
$formatthe format used to store the PGT's (`plain' and `xml' allowed)
$paththe path where the PGT's should be stored

Definition at line 730 of file CAS.php.

References $path, $PHPCAS_AUTH_CHECK_CALL, $PHPCAS_CLIENT, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

{
if (!is_object($PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!$PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if ($PHPCAS_AUTH_CHECK_CALL['done']) {
phpCAS :: error('this method should only be called before ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() (called at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ')');
}
if (gettype($format) != 'string') {
phpCAS :: error('type mismatched for parameter $format (should be `string\')');
}
if (gettype($path) != 'string') {
phpCAS :: error('type mismatched for parameter $format (should be `string\')');
}
$PHPCAS_CLIENT->setPGTStorageFile($format, $path);
}

+ Here is the call graph for this function:

Variable Documentation

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE = 'phpCAS'

default database when storing PGT's to database

Definition at line 98 of file CAS.php.

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE = 'phpCAS'

default database when storing PGT's to database

Definition at line 180 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE = 'mysql'

default database type when storing PGT's to database

Definition at line 86 of file CAS.php.

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE = 'mysql'

default database type when storing PGT's to database

Definition at line 168 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME = 'localhost'

default host when storing PGT's to database

Definition at line 90 of file CAS.php.

const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME = 'localhost'

default host when storing PGT's to database

Definition at line 172 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

const CAS_PGT_STORAGE_DB_DEFAULT_PORT = ''

default port when storing PGT's to database

Definition at line 94 of file CAS.php.

const CAS_PGT_STORAGE_DB_DEFAULT_PORT = ''

default port when storing PGT's to database

Definition at line 176 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

const CAS_PGT_STORAGE_DB_DEFAULT_TABLE = 'pgt'

default table when storing PGT's to database

Definition at line 102 of file CAS.php.

const CAS_PGT_STORAGE_DB_DEFAULT_TABLE = 'pgt'

default table when storing PGT's to database

Definition at line 184 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT = CAS_PGT_STORAGE_FILE_FORMAT_PLAIN

Default format used when storing PGT's to file.

Definition at line 79 of file CAS.php.

const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT = CAS_PGT_STORAGE_FILE_FORMAT_PLAIN

Default format used when storing PGT's to file.

Definition at line 161 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().

const CAS_PGT_STORAGE_FILE_DEFAULT_PATH = '/tmp'

Default path used when storing PGT's to file.

Definition at line 67 of file CAS.php.

const CAS_PGT_STORAGE_FILE_DEFAULT_PATH = '/tmp'

Default path used when storing PGT's to file.

Definition at line 149 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().

const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN = 'plain'

phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files

Definition at line 71 of file CAS.php.

const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN = 'plain'

phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files

Definition at line 153 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().

const CAS_PGT_STORAGE_FILE_FORMAT_XML = 'xml'

phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files

Definition at line 75 of file CAS.php.

const CAS_PGT_STORAGE_FILE_FORMAT_XML = 'xml'

phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files

Definition at line 157 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().