ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
+ 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:273
_getServerBaseURL()
This method is used to retrieve the base URL of the CAS server.
Definition: Client.php:313
static getVersion()
This method returns the phpCAS version.
Definition: CAS.php:714

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 129 of file Client.php.

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

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

Referenced by CAS_Client\_authError(), 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__', $title,
106 (empty($this->_output_header)
107 ? '<html><head><title>__TITLE__</title></head><body><h1>__TITLE__</h1>'
108 : $this->_output_header)
109 )
110 );
111 }

References $title, and 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 166 of file Client.php.

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

◆ 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 150 of file Client.php.

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

References $header.

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 120 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.