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

Inheritance: extends XmlBase
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$schemas string[] Paths to the schema files.

Méthodes publiques

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

Méthodes protégées

Méthode 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 méthode

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

formatSVRLFailure() protected méthode

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

schematronValidate() protected méthode

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
Résultat string[]

validate() public méthode

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

validateBySchema() protected méthode

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

Property Details

$schemas protected_oe property

Paths to the schema files.
protected string[] $schemas
Résultat string[]