PHP Class eZ\Publish\Core\FieldType\RichText\Validator

Inheritance: extends XmlBase
Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$schemas string[] Paths to the schema files.

Public Methods

Method Description
__construct ( array $schemas )
validate ( DOMDocument $document ) : string[] Performs validation on given $document using injected schema files and returns validation errors.

Protected Methods

Method Description
formatSVRLFailure ( DOMElement $failedAssert ) : string Returns SVRL assertion failure as a string.
schematronValidate ( DOMDocument $document, string $filename ) : string[] Validates given $document using XSLT stylesheet converted from ISO Schematron schema and returns an array or error messages.
validateBySchema ( DOMDocument $document, string $schema ) : string[] Performs validation on given $document using given $schema file and returns validation errors.

Method Details

__construct() public method

public __construct ( array $schemas )
$schemas array Paths to schema files to use for validation

formatSVRLFailure() protected method

Returns SVRL assertion failure as a string.
protected formatSVRLFailure ( DOMElement $failedAssert ) : string
$failedAssert DOMElement
return string

schematronValidate() protected method

Validates given $document using XSLT stylesheet converted from ISO Schematron schema and returns an array or error messages.
protected schematronValidate ( DOMDocument $document, string $filename ) : string[]
$document DOMDocument
$filename string
return string[]

validate() public method

Handles ISO Schematron (as XSLT stylesheet), XSD and RELAX NG schemas.
public validate ( DOMDocument $document ) : string[]
$document DOMDocument
return string[] An array of validation errors

validateBySchema() protected method

Performs validation on given $document using given $schema file and returns validation errors.
protected validateBySchema ( DOMDocument $document, string $schema ) : string[]
$document DOMDocument
$schema string
return string[]

Property Details

$schemas protected_oe property

Paths to the schema files.
protected string[] $schemas
return string[]