Skip to content

Class ZugferdKositValidator

HorstOeko edited this page Dec 15, 2024 · 21 revisions

Summary

Class representing the validator against Schematron (Kosit) for documents

Methods

__construct

Summary

Constructor

Signature

public function __construct(?horstoeko\zugferd\ZugferdDocument $document = null): void
{
}

Parameters

Name Type Allows Null Description
document horstoeko\zugferd\ZugferdDocument ✔️

setDocument

Summary

Set the ZugferdDocument instance to validate

Signature

public function setDocument(horstoeko\zugferd\ZugferdDocument $document): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
document horstoeko\zugferd\ZugferdDocument

Returns

Returns a value of type \ZugferdKositValidator

setBaseDirectory

Summary

Setup the base directory. In the base directory all files will be downloaded
and created

Signature

public function setBaseDirectory(string $newBaseDirectory): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newBaseDirectory string

Returns

Returns a value of type \ZugferdKositValidator

setValidatorDownloadUrl

Summary

Setup the KOSIT validator application download url

Signature

public function setValidatorDownloadUrl(string $newValidatorDownloadUrl): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorDownloadUrl string

Returns

Returns a value of type \ZugferdKositValidator

setValidatorScenarioDownloadUrl

Summary

Setup the KOSIT validator scenario download url

Signature

public function setValidatorScenarioDownloadUrl(string $newValidatorScenarioDownloadUrl): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorScenarioDownloadUrl string

Returns

Returns a value of type \ZugferdKositValidator

setValidatorAppZipFilename

Summary

Set the filename of the ZIP file which contains the validation application

Signature

public function setValidatorAppZipFilename(string $newValidatorAppZipFilename): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorAppZipFilename string

Returns

Returns a value of type \ZugferdKositValidator

setValidatorScenarioZipFilename

Summary

Set the filename of the ZIP file which contains the validation scenarios

Signature

public function setValidatorScenarioZipFilename(string $newValidatorScenarioZipFilename): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorScenarioZipFilename string

Returns

Returns a value of type \ZugferdKositValidator

setValidatorAppJarFilename

Summary

Set the filename of the applications JAR

Signature

public function setValidatorAppJarFilename(string $newValidatorAppJarFilename): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorAppJarFilename string

Returns

Returns a value of type \ZugferdKositValidator

setValidatorAppScenarioFilename

Summary

Set the filename of the application scenario file

Signature

public function setValidatorAppScenarioFilename(string $newValidatorAppScenarioFilename): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newValidatorAppScenarioFilename string

Returns

Returns a value of type \ZugferdKositValidator

setFileToValidateFilename

Summary

Set the filename of the file which contains the temporary xml data to validate

Signature

public function setFileToValidateFilename(string $newFileToValidateFilename): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
newFileToValidateFilename string

Returns

Returns a value of type \ZugferdKositValidator

disableCleanup

Summary

Disable cleanup base directory

Signature

public function disableCleanup(): \ZugferdKositValidator
{
}

Returns

Returns a value of type \ZugferdKositValidator

enableCleanup

Summary

Enable cleanup base directory

Signature

public function enableCleanup(): \ZugferdKositValidator
{
}

Returns

Returns a value of type \ZugferdKositValidator

disableRemoteMode

Summary

Disable the usage of a remote host validation

Signature

public function disableRemoteMode(): \ZugferdKositValidator
{
}

Returns

Returns a value of type \ZugferdKositValidator

enableRemoteMode

Summary

Enable the usage of a remote host validation

Signature

public function enableRemoteMode(): \ZugferdKositValidator
{
}

Returns

Returns a value of type \ZugferdKositValidator

setRemoteModeHost

Summary

Set the hostname or the ip of the remote host where the validation application
is running in daemon mode

Signature

public function setRemoteModeHost(string $remoteModeHost): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
remoteModeHost string

Returns

Returns a value of type \ZugferdKositValidator

setRemoteModePort

Summary

Set the port of the remote host where the validation application
is running in daemon mode

Signature

public function setRemoteModePort(int $remoteModePort): \ZugferdKositValidator
{
}

Parameters

Name Type Allows Null Description
remoteModePort int

Returns

Returns a value of type \ZugferdKositValidator

getRemoteModeUrl

Summary

Returns the full remote mode URL

Signature

public function getRemoteModeUrl(): string
{
}

Returns

Returns a value of type string

validate

Summary

Perform validation

Signature

public function validate(): \ZugferdKositValidator
{
}

Returns

Returns a value of type \ZugferdKositValidator

getValidationErrors

Summary

Returns an array of all validation errors

Signature

public function getValidationErrors(): array
{
}

Returns

Returns a value of type array

hasNoValidationErrors

Summary

Returns true if no validation errors are present otherwise false

Signature

public function hasNoValidationErrors(): bool
{
}

Returns

Returns a value of type bool

hasValidationErrors

Summary

Returns true if validation errors are present otherwise false

Signature

public function hasValidationErrors(): bool
{
}

Returns

Returns a value of type bool

getValidationWarnings

Summary

Returns an array of all validation warnings

Signature

public function getValidationWarnings(): array
{
}

Returns

Returns a value of type array

hasNoValidationWarnings

Summary

Returns true if no validation warnings are present otherwise false

Signature

public function hasNoValidationWarnings(): bool
{
}

Returns

Returns a value of type bool

hasValidationWarnings

Summary

Returns true if validation warnings are present otherwise false

Signature

public function hasValidationWarnings(): bool
{
}

Returns

Returns a value of type bool

getValidationInformation

Summary

Returns an array of all validation information

Signature

public function getValidationInformation(): array
{
}

Returns

Returns a value of type array

hasNoValidationInformation

Summary

Returns true if no validation information are present otherwise false

Signature

public function hasNoValidationInformation(): bool
{
}

Returns

Returns a value of type bool

hasValidationInformation

Summary

Returns true if validation Information are present otherwise false

Signature

public function hasValidationInformation(): bool
{
}

Returns

Returns a value of type bool

getProcessErrors

Summary

Return an array of all internal errors (such as download error or system exceptions)

Signature

public function getProcessErrors(): array
{
}

Returns

Returns a value of type array

hasNoProcessErrors

Summary

Returns true if there are no system errors (e.g. exceptions before the validation app was called)

Signature

public function hasNoProcessErrors(): bool
{
}

Returns

Returns a value of type bool

hasProcessErrors

Summary

Returns true if there are any system errors (e.g. exceptions before the validation app was called)

Signature

public function hasProcessErrors(): bool
{
}

Returns

Returns a value of type bool

getProcessOutput

Summary

Returns an array of all messages from process system (calling external applications)

Signature

public function getProcessOutput(): array
{
}

Returns

Returns a value of type array