<?php
namespace App\Galileo\StructureParser\Structures\NDCEMD;

class Passengers extends \App\Galileo\StructureParser\Structures\Ticketing\Passengers
{
	protected function _getData()
	{
		list($parsedStructure, , $transactionIndexes, $internalAssociations) = $this->getTransactionDetails();

		$passengers = new \App\Galileo\StructureParser\Types\Passengers();

		$item = new \App\Galileo\StructureParser\Types\Passenger();

		$A02 = $parsedStructure['A02'][0];	// load data from the first pax

		$item = $this->getDataFromA02($item, $A02);
		$item = $this->extractEmails($item, $parsedStructure);
		$item = $this->extractPhoneNumbers($item, $parsedStructure);

		$passengers->append($item);

		return $passengers;
	}
}
