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 for this file: /Document/src/validation_error.php
Version: | //autogen// |
protected static array |
$errorTypes
textual mapping for libxml error types. |
protected mixed |
$error
Original error object |
protected string |
$message
Transformed error message. |
public static ezcDocumentValidationError |
createFromException(
$e
)
Create validation error from Exception |
public static ezcDocumentValidationError |
createFromLibXmlError(
$error
)
Create from LibXmlError |
protected void |
__construct(
$message
, [ $error
= null] )
Create validation error object |
public mixed |
getOriginalError(
)
Get original error object |
public void |
__toString(
)
Convert libXML error to string |
Create validation error from Exception
Name | Type | Description |
---|---|---|
$e |
Exception |
Create from LibXmlError
Create a validation error object from a LibXmlError error object.
Name | Type | Description |
---|---|---|
$error |
LibXMLError |
Create validation error object
Name | Type | Description |
---|---|---|
$message |
string | |
$error |
mixed |
Get original error object
Convert libXML error to string