DatamatrixEncoding

Backed enum for the Data Matrix default encoding scheme.

Table of contents

Namespace: Com\Tecnick\Barcode\Type\Square\Datamatrix

enum DatamatrixEncoding: string

Source: src/Type/Square/Datamatrix/DatamatrixEncoding.php:35

Backed enum for the Data Matrix default encoding scheme. The backing value of each case is a public key of Data::ENCOPTS.

Cases

  • ASCII = 'ASCII'
  • C40 = 'C40'
  • TXT = 'TXT'
  • X12 = 'X12'
  • EDF = 'EDF'
  • BASE256 = 'BASE256'

Methods

fromLoose()

Resolve a loose Data Matrix encoding value to the matching enum case.

Accepts the canonical scheme name, one of the ALIASES, or an enum instance (returned unchanged). Unknown values fall back to ASCII, matching the lenient behavior of Datamatrix.

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

Parameters:

  • $value (string|self): Encoding scheme name or enum case.

Returns: self

Source: src/Type/Square/Datamatrix/DatamatrixEncoding.php:65