ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Access to external services
+ Collaboration diagram for Access to external services:

Functions

 phpCAS::serviceWeb ($url, &$err_code, &$output)
 This method is used to access an HTTP[S] service.
 phpCAS::serviceMail ($url, $service, $flags, &$err_code, &$err_msg, &$pt)
 This method is used to access an IMAP/POP3/NNTP service.

Variables

const PHPCAS_SERVICE_OK = 0
 phpCAS::service() error code on success
const PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE = 1
 phpCAS::service() error code when the PT could not retrieve because the CAS server did not respond.
const PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE = 2
 phpCAS::service() error code when the PT could not retrieve because the response of the CAS server was ill-formed.
const PHPCAS_SERVICE_PT_FAILURE = 3
 phpCAS::service() error code when the PT could not retrieve because the CAS server did not want to.
const AVAILABLE = 4
 phpCAS::service() error code when the service was not available.
const PHPCAS_SERVICE_OK = 0
 phpCAS::service() error code on success
const PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE = 1
 phpCAS::service() error code when the PT could not retrieve because the CAS server did not respond.
const PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE = 2
 phpCAS::service() error code when the PT could not retrieve because the response of the CAS server was ill-formed.
const PHPCAS_SERVICE_PT_FAILURE = 3
 phpCAS::service() error code when the PT could not retrieve because the CAS server did not want to.
const AVAILABLE = 4
 phpCAS::service() error code when the service was not available.

Detailed Description

Function Documentation

phpCAS::serviceMail (   $url,
  $service,
  $flags,
$err_code,
$err_msg,
$pt 
)

This method is used to access an IMAP/POP3/NNTP service.

Parameters
$urla string giving the URL of the service, including the mailing box for IMAP URLs, as accepted by imap_open().
$servicea string giving for CAS retrieve Proxy ticket
$flagsoptions given to imap_open().
$err_codean error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT AVAILABLE.
$err_msgan error message on failure
$ptthe Proxy Ticket (PT) retrieved from the CAS server to access the URL on success, FALSE on error).
Returns
an IMAP stream on success, FALSE otherwise (in this later case, $err_code gives the reason why it failed and $err_msg contains an error message).

Definition at line 871 of file CAS.php.

References $PHPCAS_AUTH_CHECK_CALL, $PHPCAS_CLIENT, $res, 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 after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
phpCAS :: error('authentication was checked (by ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ') but the method returned FALSE');
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string\')');
}
if (gettype($flags) != 'integer') {
phpCAS :: error('type mismatched for parameter $flags (should be `integer\')');
}
$res = $PHPCAS_CLIENT->serviceMail($url, $service, $flags, $err_code, $err_msg, $pt);
return $res;
}

+ Here is the call graph for this function:

phpCAS::serviceWeb (   $url,
$err_code,
$output 
)

This method is used to access an HTTP[S] service.

Parameters
$urlthe service to access.
$err_codean error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT AVAILABLE.
$outputthe output of the service (also used to give an error message on failure).
Returns
TRUE on success, FALSE otherwise (in this later case, $err_code gives the reason why it failed and $output contains an error message).

Definition at line 828 of file CAS.php.

References $PHPCAS_AUTH_CHECK_CALL, $PHPCAS_CLIENT, $res, 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 after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
}
if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
phpCAS :: error('authentication was checked (by ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ') but the method returned FALSE');
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string\')');
}
$res = $PHPCAS_CLIENT->serviceWeb($url, $err_code, $output);
return $res;
}

+ Here is the call graph for this function:

Variable Documentation

const AVAILABLE = 4

phpCAS::service() error code when the service was not available.

Definition at line 135 of file CAS.php.

const AVAILABLE = 4

phpCAS::service() error code when the service was not available.

Definition at line 217 of file CAS.php.

const PHPCAS_SERVICE_OK = 0

phpCAS::service() error code on success

Definition at line 116 of file CAS.php.

const PHPCAS_SERVICE_OK = 0

phpCAS::service() error code on success

Definition at line 198 of file CAS.php.

const PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE = 2

phpCAS::service() error code when the PT could not retrieve because the response of the CAS server was ill-formed.

Definition at line 126 of file CAS.php.

const PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE = 2

phpCAS::service() error code when the PT could not retrieve because the response of the CAS server was ill-formed.

Definition at line 208 of file CAS.php.

const PHPCAS_SERVICE_PT_FAILURE = 3

phpCAS::service() error code when the PT could not retrieve because the CAS server did not want to.

Definition at line 131 of file CAS.php.

const PHPCAS_SERVICE_PT_FAILURE = 3

phpCAS::service() error code when the PT could not retrieve because the CAS server did not want to.

Definition at line 213 of file CAS.php.

const PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE = 1

phpCAS::service() error code when the PT could not retrieve because the CAS server did not respond.

Definition at line 121 of file CAS.php.

const PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE = 1

phpCAS::service() error code when the PT could not retrieve because the CAS server did not respond.

Definition at line 203 of file CAS.php.