Document: ezcDocumentValidationError
[ ]
[ Conversion ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentValidationError
|
Unifies different errors into a single structure for all kinds of validation errors. The validation error message can be fetched using the __toString() method, while the original error is still be available, fi required. [
source]
Member Variables
|
protected mixed |
$error
Original error object |
|
protected array |
$errorTypes
= array( LIBXML_ERR_WARNING => 'Warning', LIBXML_ERR_ERROR => 'Error', LIBXML_ERR_FATAL => 'Fatal error', )
textual mapping for libxml error types. |
|
protected string |
$message
Transformed error message. |
Method Summary
Methods
__construct
void __construct(
string
$message, [mixed
$error = null] )
Create validation error object
Parameters
| Name |
Type |
Description |
$message |
string |
|
$error |
mixed |
|
createFromException
Create validation error from Exception
Parameters
| Name |
Type |
Description |
$e |
Exception |
|
createFromLibXmlError
Create from LibXmlError
Create a validation error object from a LibXmlError error object.
Parameters
| Name |
Type |
Description |
$error |
LibXMLError |
|
getOriginalError
mixed getOriginalError(
)
Get original error object
__toString
void __toString(
)
Convert libXML error to string
Last updated: Mon, 11 May 2009