<?php
namespace App\Utils\BaseParser\Structure\StructureParser\Types;

/**
 * Base structure for the passenger data
 * Each passenger will contain lists of passports & FFCards
 * @author Lucian
 */
abstract class Passengers extends \App\Utils\BaseParser\Structure\StructureParser\Types\BaseAbstract
{
	public $passengers = 	[];

	public function append(\App\Utils\BaseParser\Structure\StructureParser\Types\Passenger $item)
	{
		$this->passengers[] = $item;
	}

	/**
	 * Get the transaction owner
	 * @return \App\Utils\BaseParser\Structure\StructureParser\Types\Passenger
	 */
	public function getOwner()
	{
		return reset($this->passengers);
	}
}
