ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Debugging
+ Collaboration diagram for Debugging:

Functions

 phpCAS::backtrace ()
 This method is a wrapper for debug_backtrace() that is not available in all PHP versions (>= 4.3.0 only)
 phpCAS::log ($str)
 Logs a string in debug mode.
 phpCAS::error ($msg)
 This method is used by interface methods to print an error and where the function was originally called from.
 phpCAS::trace ($str)
 This method is used to log something in debug mode.
 phpCAS::traceBegin ()
 This method is used to indicate the start of the execution of a function in debug mode.
 phpCAS::traceEnd ($res= '')
 This method is used to indicate the end of the execution of a function in debug mode.
 phpCAS::traceExit ()
 This method is used to indicate the end of the execution of the program.

Detailed Description

Function Documentation

phpCAS::backtrace ( )

This method is a wrapper for debug_backtrace() that is not available in all PHP versions (>= 4.3.0 only)

Definition at line 507 of file CAS.php.

Referenced by phpCAS\checkAuthentication(), phpCAS\client(), phpCAS\error(), phpCAS\forceAuthentication(), phpCAS\isAuthenticated(), phpCAS\proxy(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().

{
if (function_exists('debug_backtrace')) {
return debug_backtrace();
} else {
// poor man's hack ... but it does work ...
return array ();
}
}

+ Here is the caller graph for this function:

phpCAS::error (   $msg)
private

This method is used by interface methods to print an error and where the function was originally called from.

Parameters
$msgthe message to print

Definition at line 544 of file CAS.php.

References $file, phpCAS\backtrace(), exit, phpCAS\trace(), and phpCAS\traceExit().

Referenced by phpCAS\authenticate(), CASClient\CASClient(), phpCAS\checkAuthentication(), phpCAS\client(), phpCAS\forceAuthentication(), CASClient\getAttributes(), phpCAS\getAttributes(), phpCAS\getServerLoginURL(), phpCAS\getServerLogoutURL(), phpCAS\getServiceURL(), PGTStorage\getStorageInfo(), PGTStorage\getStorageType(), CASClient\getUser(), phpCAS\getUser(), phpCAS\handleLogoutRequests(), CASClient\handleLogoutRequests(), PGTStorageDB\init(), phpCAS\isAuthenticated(), phpCAS\isSessionAuthenticated(), phpCAS\logout(), phpCAS\logoutWithRedirectService(), phpCAS\logoutWithRedirectServiceAndUrl(), phpCAS\logoutWithUrl(), PGTStorage\PGTStorage(), PGTStorageFile\PGTStorageFile(), phpCAS\proxy(), PGTStorage\read(), CASClient\readURL(), CASClient\renameSession(), phpCAS\retrievePT(), phpCAS\serviceMail(), phpCAS\serviceWeb(), phpCAS\setCacheTimesForAuthRecheck(), phpCAS\setCasServerCACert(), phpCAS\setCasServerCert(), phpCAS\setDebug(), phpCAS\setExtraCurlOption(), phpCAS\setFixedCallbackURL(), phpCAS\setFixedServiceURL(), phpCAS\setHTMLFooter(), phpCAS\setHTMLHeader(), phpCAS\setLang(), phpCAS\setNoCasServerValidation(), phpCAS\setPGTStorageDB(), CASClient\setPGTStorageDB(), phpCAS\setPGTStorageFile(), CASClient\setPGTStorageFile(), phpCAS\setServerLoginURL(), phpCAS\setServerLogoutURL(), phpCAS\setServerProxyValidateURL(), phpCAS\setServerSamlValidateURL(), phpCAS\setServerServiceValidateURL(), PGTStorage\write(), and PGTStorageFile\write().

{
$function = '?';
$file = '?';
$line = '?';
if (is_array($dbg)) {
for ($i = 1; $i < sizeof($dbg); $i++) {
if (is_array($dbg[$i])) {
if ($dbg[$i]['class'] == __CLASS__) {
$function = $dbg[$i]['function'];
$file = $dbg[$i]['file'];
$line = $dbg[$i]['line'];
}
}
}
}
echo "<br />\n<b>phpCAS error</b>: <font color=\"FF0000\"><b>" . __CLASS__ . "::" . $function . '(): ' . htmlentities($msg) . "</b></font> in <b>" . $file . "</b> on line <b>" . $line . "</b><br />\n";
exit ();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

phpCAS::log (   $str)
private

Logs a string in debug mode.

Parameters
$strthe string to write

Definition at line 523 of file CAS.php.

References $PHPCAS_DEBUG.

Referenced by CASClient\handleLogoutRequests(), CASClient\isAuthenticated(), CASClient\logout(), CASClient\redirectToCas(), phpCAS\trace(), phpCAS\traceBegin(), phpCAS\traceEnd(), phpCAS\traceExit(), and CASClient\validatePGT().

{
$indent_str = ".";
global $PHPCAS_DEBUG;
if ($PHPCAS_DEBUG['filename']) {
for ($i = 0; $i < $PHPCAS_DEBUG['indent']; $i++) {
$indent_str .= '| ';
}
error_log($PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str . $str . "\n", 3, $PHPCAS_DEBUG['filename']);
}
}

+ Here is the caller graph for this function:

phpCAS::traceBegin ( )

This method is used to indicate the start of the execution of a function in debug mode.

Definition at line 577 of file CAS.php.

References $PHPCAS_DEBUG, phpCAS\backtrace(), and phpCAS\log().

Referenced by CASClient\authError(), CASClient\buildSAMLPayload(), CASClient\callback(), CASClient\CASClient(), CASClient\checkAuthentication(), phpCAS\checkAuthentication(), phpCAS\client(), CASClient\forceAuthentication(), phpCAS\forceAuthentication(), PGTStorageFile\getPGTIouFilename(), CASClient\getServerLoginURL(), CASClient\getServerSamlValidateURL(), CASClient\handleLogoutRequests(), PGTStorageFile\init(), PGTStorageDB\init(), CASClient\isAuthenticated(), phpCAS\isAuthenticated(), CASClient\logout(), phpCAS\logout(), phpCAS\logoutWithRedirectService(), phpCAS\logoutWithRedirectServiceAndUrl(), phpCAS\logoutWithUrl(), PGTStorage\PGTStorage(), PGTStorageDB\PGTStorageDB(), PGTStorageFile\PGTStorageFile(), phpCAS\proxy(), PGTStorageFile\read(), CASClient\readURL(), CASClient\redirectToCas(), CASClient\renameSession(), CASClient\renewAuthentication(), CASClient\retrievePT(), phpCAS\serviceMail(), phpCAS\serviceWeb(), CASClient\serviceWeb(), phpCAS\setCasServerCACert(), phpCAS\setCasServerCert(), phpCAS\setExtraCurlOption(), phpCAS\setFixedCallbackURL(), phpCAS\setFixedServiceURL(), phpCAS\setNoCasServerValidation(), phpCAS\setPGTStorageDB(), phpCAS\setPGTStorageFile(), phpCAS\setServerLoginURL(), phpCAS\setServerLogoutURL(), phpCAS\setServerProxyValidateURL(), phpCAS\setServerSamlValidateURL(), phpCAS\setServerServiceValidateURL(), CASClient\setSessionAttributes(), CASClient\validatePGT(), CASClient\validatePT(), CASClient\validateSA(), CASClient\validateST(), CASClient\wasPreviouslyAuthenticated(), and PGTStorageFile\write().

{
global $PHPCAS_DEBUG;
$str = '=> ';
if (!empty ($dbg[2]['class'])) {
$str .= $dbg[2]['class'] . '::';
}
$str .= $dbg[2]['function'] . '(';
if (is_array($dbg[2]['args'])) {
foreach ($dbg[2]['args'] as $index => $arg) {
if ($index != 0) {
$str .= ', ';
}
$str .= str_replace("\n", "", var_export($arg, TRUE));
}
}
$str .= ') [' . basename($dbg[2]['file']) . ':' . $dbg[2]['line'] . ']';
$PHPCAS_DEBUG['indent']++;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

phpCAS::traceEnd (   $res = '')

This method is used to indicate the end of the execution of a function in debug mode.

Parameters
$resthe result of the function

Definition at line 604 of file CAS.php.

References $PHPCAS_DEBUG, $res, phpCAS\backtrace(), and phpCAS\log().

Referenced by CASClient\buildSAMLPayload(), CASClient\CASClient(), CASClient\checkAuthentication(), phpCAS\checkAuthentication(), phpCAS\client(), CASClient\forceAuthentication(), PGTStorageFile\getPGTIouFilename(), CASClient\getServerLoginURL(), CASClient\getServerSamlValidateURL(), CASClient\handleLogoutRequests(), PGTStorageFile\init(), CASClient\isAuthenticated(), phpCAS\isAuthenticated(), phpCAS\logout(), phpCAS\logoutWithRedirectService(), phpCAS\logoutWithRedirectServiceAndUrl(), phpCAS\logoutWithUrl(), PGTStorage\PGTStorage(), PGTStorageDB\PGTStorageDB(), PGTStorageFile\PGTStorageFile(), phpCAS\proxy(), PGTStorageFile\read(), CASClient\readURL(), CASClient\renameSession(), CASClient\renewAuthentication(), CASClient\retrievePT(), phpCAS\serviceMail(), phpCAS\serviceWeb(), phpCAS\setCasServerCACert(), phpCAS\setCasServerCert(), phpCAS\setExtraCurlOption(), phpCAS\setFixedCallbackURL(), phpCAS\setFixedServiceURL(), phpCAS\setNoCasServerValidation(), phpCAS\setPGTStorageDB(), phpCAS\setPGTStorageFile(), phpCAS\setServerLoginURL(), phpCAS\setServerLogoutURL(), phpCAS\setServerProxyValidateURL(), phpCAS\setServerSamlValidateURL(), phpCAS\setServerServiceValidateURL(), CASClient\setSessionAttributes(), CASClient\validatePGT(), CASClient\wasPreviouslyAuthenticated(), and PGTStorageFile\write().

{
global $PHPCAS_DEBUG;
$PHPCAS_DEBUG['indent']--;
$str = '';
$str .= '<= ' . str_replace("\n", "", var_export($res, TRUE));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

phpCAS::traceExit ( )

This method is used to indicate the end of the execution of the program.

Definition at line 617 of file CAS.php.

References $PHPCAS_DEBUG, and phpCAS\log().

Referenced by CASClient\authError(), CASClient\callback(), phpCAS\error(), CASClient\handleLogoutRequests(), CASClient\logout(), and CASClient\redirectToCas().

{
global $PHPCAS_DEBUG;
phpCAS :: log('exit()');
while ($PHPCAS_DEBUG['indent'] > 0) {
$PHPCAS_DEBUG['indent']--;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function: