Documentation for the custom error show function.
Thanks to Andjelko Horvat for providing the documentation patch. git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@2725 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
parent
22e7cd83c9
commit
c2ca538cc1
|
@ -38,6 +38,14 @@ $config = array (
|
|||
|
||||
'showerrors' => TRUE,
|
||||
|
||||
/**
|
||||
* Custom error show function called from SimpleSAML_Error_Error::show.
|
||||
* See docs/simplesamlphp-errorhandling.txt for function code example.
|
||||
*
|
||||
* Example:
|
||||
* 'errors.show_function' => 'sspmod_exmaple_Error_Show::show',
|
||||
*/
|
||||
|
||||
/**
|
||||
* This option allows you to enable validation of XML data against its
|
||||
* schemas. A warning will be written to the log if validation fails.
|
||||
|
|
|
@ -227,3 +227,17 @@ This happens regardless of whether the exception is delivered directly or throug
|
|||
This is done to be consistent in what the application receives - now it will always receive the same exception, regardless of whether it is delivered directly or through a redirect.
|
||||
|
||||
|
||||
Custom error show function
|
||||
--------------------------
|
||||
|
||||
Optional custom error show function, called from SimpleSAML_Error_Error::show, is defined with 'errors.show_function' in config.php.
|
||||
|
||||
Example code for this function, which implements the same functionality as SimpleSAML_Error_Error::show, looks something like:
|
||||
|
||||
public static function show(SimpleSAML_Configuration $config, array $data) {
|
||||
$t = new SimpleSAML_XHTML_Template($config, 'error.php', 'errors');
|
||||
$t->data = array_merge($t->data, $data);
|
||||
$t->show();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue