<?php
namespace App\Galileo\StructureParser\Structures\Surface; class Itinerary extends \App\Galileo\StructureParser\Structures\Base\Itinerary { protected function _getData() { list($parsedStructure, , , ) = $this->getTransactionDetails(); $A166 = $parsedStructure['A166'][0]; $item = new \App\Galileo\StructureParser\Types\Itinerary(); $segment = new \App\Galileo\StructureParser\Types\ItinerarySegment(); $dep = new \App\Galileo\StructureParser\Types\ItineraryLocation(); $match = $this->match([ 'cityCode' => [$A166['A166']['A16CCC'],], ]); $dep->suggest('cityCode', $A166['A166']['A16CCC']); $dep->airportCode = $match->airportCode; $dep->cityId = $match->cityId; $dep->countryCode = $match->countryCode; $dep->date = $A166['A166']['A16DTE']; $segment->departure = $dep; $dest = new \App\Galileo\StructureParser\Types\ItineraryLocation(); $dest->date = $A166['A166']['A16CDT']; $segment->destination = $dest; $item->appendSegment($segment); return $item; } } 