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

Functions

 phpCAS::client ($server_version, $server_hostname, $server_port, $server_uri, $start_session=true)
 phpCAS client initializer.
 phpCAS::proxy ($server_version, $server_hostname, $server_port, $server_uri, $start_session=true)
 phpCAS proxy initializer.

Detailed Description

Function Documentation

phpCAS::client (   $server_version,
  $server_hostname,
  $server_port,
  $server_uri,
  $start_session = true 
)

phpCAS client initializer.

Note
Only one of the phpCAS::client() and phpCAS::proxy functions should be called, only once, and before all other methods (except phpCAS::getVersion() and phpCAS::setDebug()).
Parameters
$server_versionthe version of the CAS server
$server_hostnamethe hostname of the CAS server
$server_portthe port the CAS server is running on
$server_urithe URI the CAS server is responding on
$start_sessionHave phpCAS start PHP sessions (default true)
Returns
a newly created CASClient object

Definition at line 366 of file CAS.php.

References $PHPCAS_CLIENT, $PHPCAS_INIT_CALL, phpCAS\backtrace(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by ilCASAuth\ilCASAuth(), and ilAuthContainerCAS\initCAS().

{
if (is_object($PHPCAS_CLIENT)) {
phpCAS :: error($PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . $PHPCAS_INIT_CALL['file'] . ':' . $PHPCAS_INIT_CALL['line'] . ')');
}
if (gettype($server_version) != 'string') {
phpCAS :: error('type mismatched for parameter $server_version (should be `string\')');
}
if (gettype($server_hostname) != 'string') {
phpCAS :: error('type mismatched for parameter $server_hostname (should be `string\')');
}
if (gettype($server_port) != 'integer') {
phpCAS :: error('type mismatched for parameter $server_port (should be `integer\')');
}
if (gettype($server_uri) != 'string') {
phpCAS :: error('type mismatched for parameter $server_uri (should be `string\')');
}
// store where the initializer is called from
$PHPCAS_INIT_CALL = array (
'done' => TRUE,
'file' => $dbg[0]['file'],
'line' => $dbg[0]['line'],
'method' => __CLASS__ . '::' . __FUNCTION__
);
// initialize the global object $PHPCAS_CLIENT
$PHPCAS_CLIENT = new CASClient($server_version, FALSE /*proxy*/
, $server_hostname, $server_port, $server_uri, $start_session);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

phpCAS::proxy (   $server_version,
  $server_hostname,
  $server_port,
  $server_uri,
  $start_session = true 
)

phpCAS proxy initializer.

Note
Only one of the phpCAS::client() and phpCAS::proxy functions should be called, only once, and before all other methods (except phpCAS::getVersion() and phpCAS::setDebug()).
Parameters
$server_versionthe version of the CAS server
$server_hostnamethe hostname of the CAS server
$server_portthe port the CAS server is running on
$server_urithe URI the CAS server is responding on
$start_sessionHave phpCAS start PHP sessions (default true)
Returns
a newly created CASClient object

Definition at line 415 of file CAS.php.

References $PHPCAS_CLIENT, $PHPCAS_INIT_CALL, phpCAS\backtrace(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

{
if (is_object($PHPCAS_CLIENT)) {
phpCAS :: error($PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . $PHPCAS_INIT_CALL['file'] . ':' . $PHPCAS_INIT_CALL['line'] . ')');
}
if (gettype($server_version) != 'string') {
phpCAS :: error('type mismatched for parameter $server_version (should be `string\')');
}
if (gettype($server_hostname) != 'string') {
phpCAS :: error('type mismatched for parameter $server_hostname (should be `string\')');
}
if (gettype($server_port) != 'integer') {
phpCAS :: error('type mismatched for parameter $server_port (should be `integer\')');
}
if (gettype($server_uri) != 'string') {
phpCAS :: error('type mismatched for parameter $server_uri (should be `string\')');
}
// store where the initialzer is called from
$PHPCAS_INIT_CALL = array (
'done' => TRUE,
'file' => $dbg[0]['file'],
'line' => $dbg[0]['line'],
'method' => __CLASS__ . '::' . __FUNCTION__
);
// initialize the global object $PHPCAS_CLIENT
$PHPCAS_CLIENT = new CASClient($server_version, TRUE /*proxy*/
, $server_hostname, $server_port, $server_uri, $start_session);
}

+ Here is the call graph for this function: