<?php
namespace App\Bsp\HotUA\Lines\Header; class BFH01 extends \App\Bsp\HotUA\HOTBase { protected $children = [ ['key'=>'SMSG', 'type'=>'Constant', 'val'=>'BFH', 'len'=>3, 'label'=>'Standard Message Identifier'], ['key'=>'SQNR', 'type'=>'Integer', 'len'=>8, 'label'=>'Sequence Number'], ['key'=>'STNQ', 'type'=>'Constant', 'val'=>'01', 'len'=>2, 'label'=>'Standard Numeric Qualifier'], ['key'=>'BSPI', 'type'=>'StringRaw', 'len'=>3, 'label'=>'BSP Identifier'], ['key'=>'TACN', 'type'=>'StringRaw', 'len'=>3, 'label'=>'Ticketing Airline Code Number'], ['key'=>'REVN', 'type'=>'Digits', 'len'=>3, 'label'=>'Handbook Revision Number'], ['key'=>'TPST', 'type'=>'StringRaw', 'len'=>4, 'label'=>'Test/Production Status'], ['key'=>'PRDA', 'type'=>'Date', 'fmt'=>'YYMMDD', 'len'=>6, 'label'=>'Processing Date'], ['key'=>'TIME', 'type'=>'Time', 'fmt'=>'HHMM', 'len'=>4, 'label'=>'Processing time'], ['key'=>'ISOC', 'type'=>'Letters', 'len'=>2, 'label'=>'ISO Country Code'], ['key'=>'FSQN', 'type'=>'Integer', 'len'=>6, 'label'=>'File Sequence Number'], ['key'=>'RESD', 'type'=>'StringTrim', 'len'=>92, 'label'=>'Reserved Space'], ]; protected function postExtract(\App\Utils\BaseParser\TextParser\ExtractedBlock $ret) { if ($ret->extractedData['REVN']!='220') { throw new \App\Bsp\HotUA\Lines\Exception\General(sprintf("Don't know how to parse version %s of HOT files", $ret->extractedData['REVN'])); } return $ret; } } 