Skip to content

[Interpreter] Should a segment array appear as an array of arrays with one repetition? #52

@sabas

Description

@sabas

https://github.com/php-edifact/edifact/blob/master/src/EDI/Interpreter.php#L177

If a segment repeats only one time it appears directly as a value of the measurements key. If it repeats twice or more measurements has as value an array of two or more arrays.

        array(5) {
          ["segmentIdx"]=>
          int(11)
          ["segmentCode"]=>
          string(3) "MEA"
          ["measurementApplicationQualifier"]=>
          string(3) "VGM"
          ["measurementDetails"]=>
          string(0) ""
          ["valuerange"]=>
          array(2) {
            ["measureUnitQualifier"]=>
            array(1) {
              [0]=>
              string(3) "KGM"
            }
            ["measurementValue"]=>
            array(1) {
              [1]=>
              string(4) "5951"
            }
          }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions