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

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'][$internalAssociations['A14_NDC->A02'][$transactionIndexes['ks']][0]];

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

		$passengers->append($item);

		return $passengers;
	}

}
