Quittio 0.3 API

KositValidator
in package
implements ValidationDriver

FinalYes

Official Schematron validation (level L5) with the KoSIT validator.

Modes:

  • daemon: HTTP POST to a running validator (recommended; also for Docker or an own endpoint),
  • cli: one JVM per call (slow start, no service needed).

Schematron rules are XSLT 2.0, which PHP cannot execute; therefore Java is required.

Table of Contents

Interfaces

ValidationDriver
A validation driver checks one or more levels (PHP rules, XSD, KoSIT, veraPDF, …).

Constants

MODE_CLI  : string = 'cli'
MODE_DAEMON  : string = 'daemon'

Methods

__construct()  : mixed
lastReport()  : string|null
Raw report of the last validation (for archiving as test report).
levels()  : array<int, ValidationLevel>
name()  : string
supports()  : bool
Whether the driver can run for the subject (e.g. XML drivers need generated XML).
validate()  : ValidationResult
validateXml()  : array<int, ValidationMessage>

Constants

Methods

__construct()

public __construct([string $mode = self::MODE_DAEMON ][, string $url = 'http://127.0.0.1:8081' ][, string|null $jar = null ][, array<int, array{scenarios: string, repository: string}> $configurations = [] ][, string $java = 'java' ][, int $timeout = 30 ][, bool $failOnUnavailable = true ][, KositReportParser $parser = new KositReportParser() ][, callable(string, string, int): array{status: int, body: ?string}|null $http = null ]) : mixed
Parameters
$mode : string = self::MODE_DAEMON
$url : string = 'http://127.0.0.1:8081'
$jar : string|null = null
$configurations : array<int, array{scenarios: string, repository: string}> = []

cli mode only

$java : string = 'java'
$timeout : int = 30
$failOnUnavailable : bool = true
$parser : KositReportParser = new KositReportParser()
$http : callable(string, string, int): array{status: int, body: ?string}|null = null

lastReport()

Raw report of the last validation (for archiving as test report).

public lastReport() : string|null
Return values
string|null
On this page

Search results