Class

eZ\Publish\Core\FieldType\RichText\Validator

class Validator extends XmlBase

Validates XML document using ISO Schematron (as XSLT stylesheet), XSD and RELAX NG schemas.

Methods

__construct(array $schemas)

string[] validate(DOMDocument $document)

Performs validation on given $document using injected schema files and returns validation errors.

Details

at line 32
public __construct(array $schemas)

Parameters

array $schemas Paths to schema files to use for validation

at line 48
public string[] validate(DOMDocument $document)

Performs validation on given $document using injected schema files and returns validation errors.

Handles ISO Schematron (as XSLT stylesheet), XSD and RELAX NG schemas.

Parameters

DOMDocument $document

Return Value

string[] An array of validation errors

Exceptions

RuntimeException If schema file does not exist or can not be handled