HybridConformance

Backed enum for the conformance level of the XML payload of a hybrid electronic document, written as the ConformanceLevel XMP property by MetaInfo::setFacturX().

Table of contents

Namespace: Com\Tecnick\Pdf

enum HybridConformance: string

Source: src/HybridConformance.php:41

Backed enum for the conformance level of the XML payload of a hybrid electronic document, written as the ConformanceLevel XMP property by MetaInfo::setFacturX(). The backing value is the literal property value.

Not every level is defined by every profile: MINIMUM, BASIC WL and XRECHNUNG belong to Factur-X and ZUGFeRD 2, while COMFORT belongs to ZUGFeRD 1.

Cases

  • Minimum = 'MINIMUM'
  • BasicWl = 'BASIC WL'
  • Basic = 'BASIC'
  • Comfort = 'COMFORT'
  • En16931 = 'EN 16931'
  • Extended = 'EXTENDED'
  • XRechnung = 'XRECHNUNG'

Methods

fromLoose()

Resolve a loose conformance level to the matching enum case.

Accepts the property value (case-insensitive, whitespace ignored, so both ‘EN 16931’ and ’en16931’ resolve) or an enum instance (returned unchanged). Unknown values throw.

public static fromLoose(string|self $value): self

Parameters:

  • $value (string|self): Conformance level or enum case.

Returns: self

Throws:

  • Exception: if the value is not a known conformance level.

Source: src/HybridConformance.php:68