Encodation

Encodation methods of GS1 DataBar Expanded (ISO/IEC 24724) Chooses the encodation method of a sequence of GS1 Application Identifier element strings and builds its compressed data field.

Namespace: Com\Tecnick\Barcode\Type\Linear\GsOneDataBar

class Encodation

Source: src/Type/Linear/GsOneDataBar/Encodation.php:43

Encodation methods of GS1 DataBar Expanded (ISO/IEC 24724)

Chooses the encodation method of a sequence of GS1 Application Identifier element strings and builds its compressed data field. The general methods carry every element string in the general purpose data compaction field; the selected sequences of element strings listed in section 5.5.2.3.3 of the GS1 General Specifications are packed into shorter fixed fields instead.

Methods

__construct()

public __construct()

Source: src/Type/Linear/GsOneDataBar/Encodation.php:82

getEncodation()

Get the encodation method of a sequence of element strings.

public getEncodation(array<int,array{string, string}> $elements): array{string, string, string, int, int}

Parameters:

  • $elements (array<int,array{string, string}>): Application Identifier and value pairs

Returns: array{string, string, string, int, int}: Encodation method bits, compressed data field bits, characters left to the general purpose data compaction, fixed number of symbol characters or zero, and smallest number of symbol characters

Throws:

  • Exception: if the element strings cannot be encoded

Source: src/Type/Linear/GsOneDataBar/Encodation.php:288