ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
+ 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) More...
 
 phpCAS::log ($str)
 Logs a string in debug mode. More...
 
 phpCAS::error ($msg)
 This method is used by interface methods to print an error and where the function was originally called from. More...
 
 phpCAS::trace ($str)
 This method is used to log something in debug mode. More...
 
 phpCAS::traceBegin ()
 This method is used to indicate the start of the execution of a function in debug mode. More...
 
 phpCAS::traceEnd ($res='')
 This method is used to indicate the end of the execution of a function in debug mode. More...
 
 phpCAS::traceExit ()
 This method is used to indicate the end of the execution of the program. More...
 

Detailed Description

Function Documentation

◆ backtrace()

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.

507 {
508 if (function_exists('debug_backtrace')) {
509 return debug_backtrace();
510 } else {
511 // poor man's hack ... but it does work ...
512 return array ();
513 }
514 }

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

+ Here is the caller graph for this function:

◆ error()

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.

544 {
545 $dbg = phpCAS :: backtrace();
546 $function = '?';
547 $file = '?';
548 $line = '?';
549 if (is_array($dbg)) {
550 for ($i = 1; $i < sizeof($dbg); $i++) {
551 if (is_array($dbg[$i])) {
552 if ($dbg[$i]['class'] == __CLASS__) {
553 $function = $dbg[$i]['function'];
554 $file = $dbg[$i]['file'];
555 $line = $dbg[$i]['line'];
556 }
557 }
558 }
559 }
560 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";
561 phpCAS :: trace($msg);
563 exit ();
564 }
print $file
backtrace()
This method is a wrapper for debug_backtrace() that is not available in all PHP versions (>= 4....
Definition: CAS.php:507
traceExit()
This method is used to indicate the end of the execution of the program.
Definition: CAS.php:617
trace($str)
This method is used to log something in debug mode.
Definition: CAS.php:569
exit
Definition: login.php:54

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

Referenced by phpCAS\authenticate(), CASClient\CASClient(), phpCAS\checkAuthentication(), phpCAS\client(), phpCAS\forceAuthentication(), phpCAS\getAttributes(), CASClient\getAttributes(), phpCAS\getServerLoginURL(), phpCAS\getServerLogoutURL(), phpCAS\getServiceURL(), PGTStorage\getStorageInfo(), PGTStorage\getStorageType(), phpCAS\getUser(), CASClient\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(), CASClient\setPGTStorageDB(), phpCAS\setPGTStorageDB(), phpCAS\setPGTStorageFile(), CASClient\setPGTStorageFile(), phpCAS\setServerLoginURL(), phpCAS\setServerLogoutURL(), phpCAS\setServerProxyValidateURL(), phpCAS\setServerSamlValidateURL(), phpCAS\setServerServiceValidateURL(), PGTStorageFile\write(), and PGTStorage\write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ log()

phpCAS::log (   $str)
private

Logs a string in debug mode.

Parameters
$strthe string to write

Definition at line 523 of file CAS.php.

523 {
524 $indent_str = ".";
525 global $PHPCAS_DEBUG;
526
527 if ($PHPCAS_DEBUG['filename']) {
528 for ($i = 0; $i < $PHPCAS_DEBUG['indent']; $i++) {
529 $indent_str .= '| ';
530 }
531 error_log($PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str . $str . "\n", 3, $PHPCAS_DEBUG['filename']);
532 }
533
534 }
$PHPCAS_DEBUG
This global variable is used to store phpCAS debug mode.
Definition: CAS.php:206

References $PHPCAS_DEBUG, and Monolog\Handler\error_log().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trace()

phpCAS::trace (   $str)

This method is used to log something in debug mode.

Definition at line 569 of file CAS.php.

569 {
570 $dbg = phpCAS :: backtrace();
571 phpCAS :: log($str . ' [' . basename($dbg[1]['file']) . ':' . $dbg[1]['line'] . ']');
572 }
log($str)
Logs a string in debug mode.
Definition: CAS.php:523

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

Referenced by CASClient\authError(), CASClient\callback(), CASClient\CASClient(), CASClient\checkAuthentication(), phpCAS\error(), phpCAS\forceAuthentication(), CASClient\forceAuthentication(), CASClient\isAuthenticated(), PGTStorageFile\read(), CASClient\readURL(), CASClient\renameSession(), CASClient\renewAuthentication(), CASClient\retrievePT(), CASClient\serviceWeb(), phpCAS\setDebug(), CASClient\setSessionAttributes(), CASClient\validatePGT(), CASClient\validatePT(), CASClient\validateSA(), CASClient\validateST(), and CASClient\wasPreviouslyAuthenticated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ traceBegin()

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.

577 {
578 global $PHPCAS_DEBUG;
579
580 $dbg = phpCAS :: backtrace();
581 $str = '=> ';
582 if (!empty ($dbg[2]['class'])) {
583 $str .= $dbg[2]['class'] . '::';
584 }
585 $str .= $dbg[2]['function'] . '(';
586 if (is_array($dbg[2]['args'])) {
587 foreach ($dbg[2]['args'] as $index => $arg) {
588 if ($index != 0) {
589 $str .= ', ';
590 }
591 $str .= str_replace("\n", "", var_export($arg, TRUE));
592 }
593 }
594 $str .= ') [' . basename($dbg[2]['file']) . ':' . $dbg[2]['line'] . ']';
595 phpCAS :: log($str);
596 $PHPCAS_DEBUG['indent']++;
597 }

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

Referenced by CASClient\authError(), CASClient\buildSAMLPayload(), CASClient\callback(), CASClient\CASClient(), phpCAS\checkAuthentication(), CASClient\checkAuthentication(), phpCAS\client(), phpCAS\forceAuthentication(), CASClient\forceAuthentication(), PGTStorageFile\getPGTIouFilename(), CASClient\getServerLoginURL(), CASClient\getServerSamlValidateURL(), CASClient\handleLogoutRequests(), PGTStorageDB\init(), PGTStorageFile\init(), phpCAS\isAuthenticated(), CASClient\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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ traceEnd()

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.

604 {
605 global $PHPCAS_DEBUG;
606
607 $PHPCAS_DEBUG['indent']--;
608 $dbg = phpCAS :: backtrace();
609 $str = '';
610 $str .= '<= ' . str_replace("\n", "", var_export($res, TRUE));
611 phpCAS :: log($str);
612 }

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

Referenced by CASClient\buildSAMLPayload(), CASClient\CASClient(), phpCAS\checkAuthentication(), CASClient\checkAuthentication(), phpCAS\client(), CASClient\forceAuthentication(), PGTStorageFile\getPGTIouFilename(), CASClient\getServerLoginURL(), CASClient\getServerSamlValidateURL(), CASClient\handleLogoutRequests(), PGTStorageFile\init(), phpCAS\isAuthenticated(), CASClient\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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ traceExit()

phpCAS::traceExit ( )

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

Definition at line 617 of file CAS.php.

617 {
618 global $PHPCAS_DEBUG;
619
620 phpCAS :: log('exit()');
621 while ($PHPCAS_DEBUG['indent'] > 0) {
622 phpCAS :: log('-');
623 $PHPCAS_DEBUG['indent']--;
624 }
625 }

References $PHPCAS_DEBUG, and phpCAS\log().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function: