API reference / Quittio \ Core \ Validation \ Drivers
KositArtifacts
final class in quittio/core
Quittio\Core\Validation\Drivers\KositArtifacts · Source
Downloads the KoSIT validator and the XRechnung validator configuration (level L5) and compiles the Peppol BIS Billing 3.0 Schematron to XSLT with the Saxon bundled in the validator (requires Java).
Constants#
| Constant | Value | Description |
|---|---|---|
CONFIGURATION_FILE | 'xrechnung-3.0.2-validator-configuration-2026-08-31.zip' | |
CONFIGURATION_TAG | 'v2026-08-31' | |
PEPPOL_TAG | 'v3.0.20' | |
SCHXSLT_VERSION | '1.10.1' | |
SHA256 | ['https://repo1.maven.org/maven2/org/kosit/validator/1.6.3/validator-1.6.3-standalone.jar' => '799e64befca97d4080e03608c80b85dd5a5ecc5f4ae4f35d1116ec2855b9a7c9' … | SHA-256 of the pinned downloads. The default download checks them, because the validator JAR is run with java and release tags can be moved; update them together with the versions. |
VALIDATOR_VERSION | '1.6.3' |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->compilePeppol() | Compiles the Peppol Schematron into peppol/PEPPOL-EN16931-UBL.xsl below $target. download() must have run before, because Saxon comes with the validator JAR. |
::configurationUrl() | GitHub release URL of the XRechnung validator configuration archive $file at release $tag. The default download accepts only the URLs listed in SHA256. |
->download() | |
::peppolScenarios() | Scenario file for Peppol BIS Billing 3.0; the repository is the download target. |
::peppolUrl() | Download URL of the Peppol BIS Billing 3.0 Schematron for UBL at release $tag. The default download accepts only the URLs listed in SHA256. |
::schxsltUrl() | Maven Central URL of the SchXslt JAR in $version that compiles the Peppol Schematron to XSLT. The default download accepts only the URLs listed in SHA256. |
::validatorUrl() | Maven Central URL of the standalone KoSIT validator JAR in $version. The default download accepts only the URLs listed in SHA256. |
__construct()#
public function __construct(
(Closure(string): string)|null $fetch = null,
(Closure(list<string>, string, int): array{exitCode: int, stdout: string, stderr: string})|null $run = null,
)| Parameter | Type | Description |
|---|---|---|
$fetch | (Closure(string): string)|null = null | returns the body of a URL; the default checks it against SHA256 |
$run | (Closure(list<string>, string, int): array{exitCode: int, stdout: string, stderr: string})|null = null | runs a process |
compilePeppol()#
public function compilePeppol(
string $target,
string $java = 'java',
bool $force = false,
): array{scenarios: string, repository: string}Compiles the Peppol Schematron into peppol/PEPPOL-EN16931-UBL.xsl below $target. download() must have run before, because Saxon comes with the validator JAR.
| Parameter | Type | Description |
|---|---|---|
$target | string | |
$java | string = 'java' | |
$force | bool = false |
- Returns
array{scenarios: string, repository: string}
configurationUrl()#
public static function configurationUrl(
string $tag = self::CONFIGURATION_TAG,
string $file = self::CONFIGURATION_FILE,
): stringGitHub release URL of the XRechnung validator configuration archive $file at release $tag. The default download accepts only the URLs listed in SHA256.
| Parameter | Type | Description |
|---|---|---|
$tag | string = self::CONFIGURATION_TAG | |
$file | string = self::CONFIGURATION_FILE |
- Returns
string
download()#
public function download(
string $target,
bool $force = false,
): array{jar: string, scenarios: string, repository: string}| Parameter | Type | Description |
|---|---|---|
$target | string | |
$force | bool = false |
- Returns
array{jar: string, scenarios: string, repository: string}
peppolScenarios()#
public static function peppolScenarios(): stringScenario file for Peppol BIS Billing 3.0; the repository is the download target.
- Returns
string
peppolUrl()#
public static function peppolUrl(string $tag = self::PEPPOL_TAG): stringDownload URL of the Peppol BIS Billing 3.0 Schematron for UBL at release $tag. The default download accepts only the URLs listed in SHA256.
| Parameter | Type | Description |
|---|---|---|
$tag | string = self::PEPPOL_TAG |
- Returns
string
schxsltUrl()#
public static function schxsltUrl(string $version = self::SCHXSLT_VERSION): stringMaven Central URL of the SchXslt JAR in $version that compiles the Peppol Schematron to XSLT. The default download accepts only the URLs listed in SHA256.
| Parameter | Type | Description |
|---|---|---|
$version | string = self::SCHXSLT_VERSION |
- Returns
string
validatorUrl()#
public static function validatorUrl(string $version = self::VALIDATOR_VERSION): stringMaven Central URL of the standalone KoSIT validator JAR in $version. The default download accepts only the URLs listed in SHA256.
| Parameter | Type | Description |
|---|---|---|
$version | string = self::VALIDATOR_VERSION |
- Returns
string