ILIAS  release_7 Revision v7.30-3-g800a261c036
+ Collaboration diagram for HTML output:

Functions

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

Variables

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

Detailed Description

Function Documentation

◆ _htmlFilterOutput()

CAS_Client::_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 CAS_Client::PrintHTMLHeader() and CAS_Client::printHTMLFooter().

Parameters
string$strthe string to filter and output
Returns
void

Definition at line 75 of file Client.php.

76 {
77 $str = str_replace('__CAS_VERSION__', $this->getServerVersion(), $str);
78 $str = str_replace('__PHPCAS_VERSION__', phpCAS::getVersion(), $str);
79 $str = str_replace('__SERVER_BASE_URL__', $this->_getServerBaseURL(), $str);
80 echo $str;
81 }
getServerVersion()
This method is used to retrieve the version of the CAS server.
Definition: Client.php:277
_getServerBaseURL()
This method is used to retrieve the base URL of the CAS server.
Definition: Client.php:317
static getVersion()
This method returns the phpCAS version.
Definition: CAS.php:734

References CAS_Client\_getServerBaseURL(), CAS_Client\getServerVersion(), and phpCAS\getVersion().

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

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

◆ printHTMLFooter()

CAS_Client::printHTMLFooter ( )

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

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

Returns
void
See also
_htmlFilterOutput()

Definition at line 130 of file Client.php.

131 {
132 $lang = $this->getLangObj();
133 $this->_htmlFilterOutput(
134 empty($this->_output_footer)?
135 (phpcas::getVerbose())?
136 '<hr><address>phpCAS __PHPCAS_VERSION__ '
137 . $lang->getUsingServer()
138 . ' <a href="__SERVER_BASE_URL__">__SERVER_BASE_URL__</a> (CAS __CAS_VERSION__)</a></address></body></html>'
139 :'</body></html>'
140 :$this->_output_footer
141 );
142 }
getLangObj()
Create the language.
Definition: Client.php:226
_htmlFilterOutput($str)
This method filters a string by replacing special tokens by appropriate values and prints it.
Definition: Client.php:75
$lang
Definition: xapiexit.php:8

References $lang, CAS_Client\_htmlFilterOutput(), and CAS_Client\getLangObj().

Referenced by CAS_Client\_authError(), CAS_Client\_callback(), CAS_Client\logout(), and CAS_Client\redirectToCas().

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

◆ printHTMLHeader()

CAS_Client::printHTMLHeader (   $title)

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

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

Parameters
string$titlethe title of the page
Returns
void
See also
_htmlFilterOutput()

Definition at line 101 of file Client.php.

102 {
103 $this->_htmlFilterOutput(
104 str_replace(
105 '__TITLE__',
106 $title,
107 (empty($this->_output_header)
108 ? '<html><head><title>__TITLE__</title></head><body><h1>__TITLE__</h1>'
109 : $this->_output_header)
110 )
111 );
112 }

References CAS_Client\_htmlFilterOutput().

Referenced by CAS_Client\_authError(), CAS_Client\_callback(), CAS_Client\logout(), and CAS_Client\redirectToCas().

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

◆ setHTMLFooter()

CAS_Client::setHTMLFooter (   $footer)

This method set the HTML footer used for all outputs.

Parameters
string$footerthe HTML footer.
Returns
void

Definition at line 168 of file Client.php.

169 {
170 // Argument Validation
171 if (gettype($footer) != 'string') {
172 throw new CAS_TypeMismatchException($footer, '$footer', 'string');
173 }
174
175 $this->_output_footer = $footer;
176 }

◆ setHTMLHeader()

CAS_Client::setHTMLHeader (   $header)

This method set the HTML header used for all outputs.

Parameters
string$headerthe HTML header.
Returns
void

Definition at line 151 of file Client.php.

152 {
153 // Argument Validation
154 if (gettype($header) != 'string') {
155 throw new CAS_TypeMismatchException($header, '$header', 'string');
156 }
157
158 $this->_output_header = $header;
159 }

Variable Documentation

◆ $_output_footer

CAS_Client::$_output_footer
private

A string used to print the footer of HTML pages.

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

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

Definition at line 121 of file Client.php.

◆ $_output_header

CAS_Client::$_output_header
private

A string used to print the header of HTML pages.

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

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

Definition at line 90 of file Client.php.