protected function loadOptionalSegmentInformation($options)
    {
        if (!empty($options->operatingCompany)) {
            $this->segmentInformation->companyDetails->operatingCompany = $options->operatingCompany;
        }

        if ($options->arrivalDate instanceof \DateTime) {
            $this->segmentInformation->flightDate->setArrivalDate($options->arrivalDate);
        }

        if (!empty($options->groupNumber)) {
            $this->segmentInformation->flightTypeDetails = new FlightTypeDetails($options->groupNumber);
        }

        $this->loadAdditionalSegmentDetails($options->airplaneCode, $options->nrOfStops);
    }
protected function loadOptionalSegmentInformation($options)
    {
        if (!empty($options->operatingCompany)) {
            $this->segmentInformation->companyDetails->operatingCompany = $options->operatingCompany;
        }

        if ($options->arrivalDate instanceof \DateTime) {
            $this->segmentInformation->flightDate->setArrivalDate($options->arrivalDate);
        }

        if (!empty($options->groupNumber)) {
            $this->segmentInformation->flightTypeDetails = new FlightTypeDetails($options->groupNumber);
        }

        $this->loadAdditionalSegmentDetails($options->airplaneCode, $options->nrOfStops);
    }
protected function loadOptionalSegmentInformation ( $ options ) { if ( ! empty ( $ options -> operatingCompany ) ) { $ this -> segmentInformation -> companyDetails -> operatingCompany = $ options -> operatingCompany ; } if ( $ options -> arrivalDate instanceof \ DateTime ) { $ this -> segmentInformation -> flightDate -> setArrivalDate ( $ options -> arrivalDate ) ; } if ( ! empty ( $ options -> groupNumber ) ) { $ this -> segmentInformation -> flightTypeDetails = new FlightTypeDetails ( $ options -> groupNumber ) ; } $ this -> loadAdditionalSegmentDetails ( $ options -> airplaneCode , $ options -> nrOfStops ) ; }
Load non-required options if available

@param Segment $options
Load non - required options if available