<?php
namespace App\Amadeus\FileParser; class Line_SPT extends \App\Amadeus\FileParser\LineAbstract { protected $structure = [ ['name'=> 'MSGTAG', 'val' => 'SPT', 'type' => 'AN', 'req' => 'M', 'len' => 3,], ['name' => 'PARCHD', 'type' =>'composite', 'rep_min' =>0, 'rep_max' =>98, 'childs' => [ ['name'=> 'XRLOC', 'type' => 'AN', 'len' => 6,], ['name'=> 'DELIM', 'val' => ';', 'type' => 'AN', 'req' => 'M', 'len' => 1,], ] ] ]; protected function postParse() { parent::postParse(); if($this->tree['PARCHD']){ $this->tree['PARCHD'] = self::rtrimArrDeep($this->tree['PARCHD'], 1); } } } 