ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
+ Collaboration diagram for HTML output:

Functions

 CASClient::HTMLFilterOutput ($str)
 This method filters a string by replacing special tokens by appropriate values and prints it. More...
 
 CASClient::printHTMLHeader ($title)
 This method prints the header of the HTML output (after filtering). More...
 
 CASClient::printHTMLFooter ()
 This method prints the footer of the HTML output (after filtering). More...
 
 CASClient::setHTMLHeader ($header)
 This method set the HTML header used for all outputs. More...
 
 CASClient::setHTMLFooter ($footer)
 This method set the HTML footer used for all outputs. More...
 

Variables

 CASClient::$_output_header
 A string used to print the header of HTML pages. More...
 
 CASClient::$_output_footer
 A string used to print the footer of HTML pages. More...
 

Detailed Description

Function Documentation

◆ HTMLFilterOutput()

CASClient::HTMLFilterOutput (   $str)
private

This method filters a string by replacing special tokens by appropriate values and prints it.

The corresponding tokens are taken into account:

  • CAS_VERSION
  • PHPCAS_VERSION
  • SERVER_BASE_URL

Used by CASClient::PrintHTMLHeader() and CASClient::printHTMLFooter().

Parameters
$strthe string to filter and output

Definition at line 81 of file client.php.

References CASClient\getServerBaseURL(), CASClient\getServerVersion(), and phpCAS\getVersion().

Referenced by CASClient\printHTMLFooter(), and CASClient\printHTMLHeader().

82  {
83  $str = str_replace('__CAS_VERSION__',$this->getServerVersion(),$str);
84  $str = str_replace('__PHPCAS_VERSION__',phpCAS::getVersion(),$str);
85  $str = str_replace('__SERVER_BASE_URL__',$this->getServerBaseURL(),$str);
86  echo $str;
87  }
getServerVersion()
This method is used to retrieve the version of the CAS server.
Definition: client.php:297
getVersion()
This method returns the phpCAS version.
Definition: CAS.php:669
getServerBaseURL()
This method is used to retrieve the base URL of the CAS server.
Definition: client.php:331
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printHTMLFooter()

CASClient::printHTMLFooter ( )
private

This method prints the footer of the HTML output (after filtering).

If CASClient::setHTMLFooter() was not used, a default footer is output.

See also
HTMLFilterOutput()

Definition at line 136 of file client.php.

References CAS_STR_USING_SERVER, CASClient\getString(), and CASClient\HTMLFilterOutput().

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

137  {
138  $this->HTMLFilterOutput(empty($this->_output_footer)
139  ?('<hr><address>phpCAS __PHPCAS_VERSION__ '.$this->getString(CAS_STR_USING_SERVER).' <a href="__SERVER_BASE_URL__">__SERVER_BASE_URL__</a> (CAS __CAS_VERSION__)</a></address></body></html>')
140  :$this->_output_footer);
141  }
getString($str)
This method returns a string depending on the language.
Definition: client.php:221
const CAS_STR_USING_SERVER
a phpCAS string index
Definition: languages.php:15
HTMLFilterOutput($str)
This method filters a string by replacing special tokens by appropriate values and prints it...
Definition: client.php:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printHTMLHeader()

CASClient::printHTMLHeader (   $title)
private

This method prints the header of the HTML output (after filtering).

If CASClient::setHTMLHeader() was not used, a default header is output.

Parameters
$titlethe title of the page
See also
HTMLFilterOutput()

Definition at line 108 of file client.php.

References CASClient\HTMLFilterOutput().

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

109  {
110  $this->HTMLFilterOutput(str_replace('__TITLE__',
111  $title,
112  (empty($this->_output_header)
113  ? '<html><head><title>__TITLE__</title></head><body><h1>__TITLE__</h1>'
114  : $this->_output_header)
115  )
116  );
117  }
HTMLFilterOutput($str)
This method filters a string by replacing special tokens by appropriate values and prints it...
Definition: client.php:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHTMLFooter()

CASClient::setHTMLFooter (   $footer)

This method set the HTML footer used for all outputs.

Parameters
$footerthe HTML footer.

Definition at line 162 of file client.php.

163  {
164  $this->_output_footer = $footer;
165  }

◆ setHTMLHeader()

CASClient::setHTMLHeader (   $header)

This method set the HTML header used for all outputs.

Parameters
$headerthe HTML header.

Definition at line 150 of file client.php.

151  {
152  $this->_output_header = $header;
153  }

Variable Documentation

◆ $_output_footer

CASClient::$_output_footer
private

A string used to print the footer of HTML pages.

Written by CASClient::setHTMLFooter(), read by printHTMLFooter().

See also
CASClient::setHTMLFooter, CASClient::printHTMLFooter()

Definition at line 127 of file client.php.

Referenced by CASClient\printHTMLHeader().

◆ $_output_header

CASClient::$_output_header
private

A string used to print the header of HTML pages.

Written by CASClient::setHTMLHeader(), read by CASClient::printHTMLHeader().

See also
CASClient::setHTMLHeader, CASClient::printHTMLHeader()

Definition at line 97 of file client.php.

Referenced by CASClient\HTMLFilterOutput().