<?php
namespace App\Amadeus\FileParser;

class Line_ETK extends \App\Amadeus\FileParser\LineAbstract
{
	/**
	 * non AMA - ETK line
	 *
	 * This line is not generated by Amadeus, but by the airline, and its not documented in the AMA manual.
	 * We simply ignore this line, and we're rxtracting some basic data from it, without any further parsing
	 * see 05839428 - HUN TFD AIR file content ETK-I line.docx from Diana(using Win@proach)
	 */
	protected $structure = [
		['name'=> 'MSGTAG', 'val' => 'ETK-I', 'type' => 'AN', 'req' => 'M',  'len' => 5,],
		['name'=> '_extra',                   'type' => 'AN',],
	];

	/**
	 * (non-PHPdoc)
	 * @see \App\Amadeus\FileParser\LineAbstract::parse()
	 */
	public function parse()
	{
		$this->tree['_extra'] = substr($this->content, $this->structure[0]['len']);
		$this->postParse();
		return $this;
	}
}
