DOMDocumentIsValidAccordingToSchema
extends Constraint
in package
FinalYes
Asserts that a {@see DOMDocument} is valid with respect to an XML schema.
Accepted inputs are DOMDocument instances, FarahUrl instances, SplFileInfo instances containing XML, and strings containing XML. If no schema location is passed to the constructor, it is resolved from the document itself using SchemaLocator. Documents without a resolvable schema location are treated as valid.
Table of Contents
Methods
- __construct() : mixed
- evaluate() : bool|null
- toString() : string
Methods
__construct()
public
__construct([string|null $schemaLocation = null ]) : mixed
Parameters
- $schemaLocation : string|null = null
evaluate()
public
evaluate(mixed $other[, string $description = '' ][, bool $returnResult = false ]) : bool|null
Parameters
- $other : mixed
- $description : string = ''
- $returnResult : bool = false
Tags
Return values
bool|nulltoString()
public
toString() : string