final class DocumentSchema

Evaluates the bundled document-schema profile; it is not a general dialect implementation.

The profile constrains the frontmatter, requires one repeating item section per top-level heading and lists the blocks a section may contain.

Methods§

public function validate(Document $document, stdClass $frontmatter, string $file): void

Checks a parsed Markdown definition against the bundled profile.

Parameters

$documentDocumentThe parsed body
$frontmatterstdClassThe frontmatter
$filestringThe definition file

Throws

InvalidInputException When the frontmatter, the headings or the blocks break the profile
JsonException When the profile's frontmatter schema cannot be converted
ParseException When the bundled profile is malformed
Test cases 4
Called from 1
Calls 19

Test cases 10§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4
Other tests reaching this symbol 6

Relations§

Instantiated in 1
Method calls 1