code
stringlengths 17
247k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
protected function handlePostMessage($messageName, $lastResponse, $messageOptions, $result)
{
//CHECK FOR SESSION DATA:
if ($this->isStateful() === true) {
//We need to extract session info
$this->sessionData = $this->getSessionDataFromHeader($lastResponse);
$this->isAuthenticated = (!empty($this->sessionData['sessionId']) &&
!empty($this->sessionData['sequenceNumber']) &&
!empty($this->sessionData['securityToken']));
} else {
$this->isAuthenticated = false;
}
} | Handles post message actions
- look for session info and set status variables
- checks for message errors?
- ends terminated sessions
@param string $messageName
@param string $lastResponse
@param array $messageOptions
@param mixed $result
@return void | handlePostMessage | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
protected function getEndpointFromWsdl($wsdlFilePath, $messageName)
{
$wsdlId = $this->getWsdlIdFor($messageName);
return WsdlAnalyser::exaluateXpathQueryOnWsdl(
$wsdlId,
$wsdlFilePath,
self::XPATH_ENDPOINT
);
} | Get the Web Services server Endpoint from the WSDL.
@param string $wsdlFilePath
@param string $messageName
@return string|null | getEndpointFromWsdl | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
protected function getActionFromWsdl($wsdlFilePath, $messageName)
{
$wsdlId = $this->getWsdlIdFor($messageName);
return WsdlAnalyser::exaluateXpathQueryOnWsdl(
$wsdlId,
$wsdlFilePath,
sprintf(self::XPATH_OPERATION_ACTION, $messageName)
);
} | Get the SOAPAction for a given message from the WSDL contents.
@param string $wsdlFilePath
@param string $messageName
@return string|null | getActionFromWsdl | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
protected function generatePasswordDigest($password, $creationString, $messageNonce)
{
return base64_encode(sha1($messageNonce . $creationString . sha1($password, true), true));
} | Generates a Password Digest following this algorithm:
HashedPassword = Base64(SHA-1( nonce + created + SHA-1 ( password )))
as defined in
https://webservices.amadeus.com/extranet/kdbViewDocument.do?externalId=wikidoc_web_services_embedded_security_implementation_guide_header_entries_ws-security_usernametoken&docStatus=Published&mpId=fla__1__technical
EXAMPLE: with:
Nonce in Base 64 = 'PZgFvh5439plJpKpIyf5ucmXhNU='
Timestamp = '2013-01-11T09:41:03Z'
Clear Password = 'WBSPassword'
The digest algorithm returns the Encrypted Password in Base 64:
HshPwd = 'ic3AOJElVpvkz9ZBKd105Siry28='
@param string $password CLEARTEXT password (NOT the base64 encoded password used in Security_Authenticate)
@param string $creationString message creation datetime
UTC Format: yyyy-mm-ddTHH:MM:SSZ or yyyy-mm-ddTHH:MM:SS.sssZ
@param string $messageNonce Random unique string
@return string The generated Password Digest | generatePasswordDigest | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
protected function makeSoapClientOptions()
{
$options = $this->soapClientOptions;
$options['classmap'] = array_merge(Classmap::$soapheader4map, Classmap::$map);
if (!empty($this->params->soapClientOptions)) {
$options = array_merge($options, $this->params->soapClientOptions);
}
return $options;
} | Make SoapClient options for Soap Header 4 handler
@return array | makeSoapClientOptions | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
protected function isNotSecurityAuthenticateMessage($messageName)
{
return 'Security_Authenticate' !== $messageName;
} | Check is called message is not Security_Authenticate.
@param $messageName
@return bool | isNotSecurityAuthenticateMessage | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
private function getStatefulStatusCode($messageName, array $messageOptions)
{
// on security-auth this is always 'Start'
if ('Security_Authenticate' === $messageName) {
return self::TRANSACTION_STATUS_CODE_START;
}
// if endSession is set this will be (the) 'End'
if (isset($messageOptions['endSession']) && $messageOptions['endSession'] === true) {
return self::TRANSACTION_STATUS_CODE_END;
}
// on everything else we assume in-series
return self::TRANSACTION_STATUS_CODE_INSERIES;
} | Return transaction code for stateful requests.
@param string $messageName name of request message (e.g. Security_Authenticate)
@param array $messageOptions
@return string | getStatefulStatusCode | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Session/Handler/SoapHeader4.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php | Apache-2.0 |
protected function loadWsdl($params)
{
if (isset($params['wsdl'])) {
if (is_string($params['wsdl'])) {
$this->wsdl = [
$params['wsdl']
];
} elseif (is_array($params['wsdl'])) {
$this->wsdl = $params['wsdl'];
}
}
} | Load WSDL from config
Either a single WSDL location as string or a list of WSDL locations as array.
@param array $params
@return void | loadWsdl | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Params/SessionHandlerParams.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Params/SessionHandlerParams.php | Apache-2.0 |
protected function loadStateful($params)
{
$this->stateful = (isset($params['stateful'])) ? $params['stateful'] : true;
} | Load Stateful param from config
@param array $params
@return void | loadStateful | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Params/SessionHandlerParams.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Params/SessionHandlerParams.php | Apache-2.0 |
protected function loadOverrideSoapClient($params)
{
if (isset($params['overrideSoapClient']) && $params['overrideSoapClient'] instanceof \SoapClient) {
$this->overrideSoapClient = $params['overrideSoapClient'];
}
if (isset($params['overrideSoapClientWsdlName'])) {
$this->overrideSoapClientWsdlName = $params['overrideSoapClientWsdlName'];
}
} | Load Override SoapClient parameter from config
@param array $params
@return void | loadOverrideSoapClient | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Params/SessionHandlerParams.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Params/SessionHandlerParams.php | Apache-2.0 |
protected function loadSoapClientOptions($params)
{
if (isset($params['soapClientOptions']) && is_array($params['soapClientOptions'])) {
$this->soapClientOptions = $params['soapClientOptions'];
}
} | Load SoapClient Options from config
@param array $params
@return void | loadSoapClientOptions | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Params/SessionHandlerParams.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Params/SessionHandlerParams.php | Apache-2.0 |
protected function loadTransactionFlowLink($params)
{
if (isset($params['enableTransactionFlowLink']) && $params['enableTransactionFlowLink'] === true) {
$this->enableTransactionFlowLink = true;
$this->consumerId = (isset($params['consumerId'])) ? $params['consumerId'] : null;
}
} | Load TransactionFlowLink options from config
@param array $params
@return void | loadTransactionFlowLink | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Params/SessionHandlerParams.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Params/SessionHandlerParams.php | Apache-2.0 |
protected function checkAnyNotEmpty()
{
$foundNotEmpty = false;
$args = func_get_args();
foreach ($args as $arg) {
if (!empty($arg)) {
$foundNotEmpty = true;
break;
}
}
return $foundNotEmpty;
} | Check if any parameter to the current function is not empty
@param mixed
@return boolean true if at least 1 parameter is not empty | checkAnyNotEmpty | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/WsMessageUtility.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/WsMessageUtility.php | Apache-2.0 |
protected function checkAllNotEmpty()
{
$foundEmpty = false;
$args = func_get_args();
foreach ($args as $arg) {
if (empty($arg)) {
$foundEmpty = true;
break;
}
}
return !$foundEmpty;
} | Check if all parameters to the current function are not empty
@param mixed
@return boolean true if all parameters are not empty | checkAllNotEmpty | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/WsMessageUtility.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/WsMessageUtility.php | Apache-2.0 |
protected function checkAllIntegers()
{
$foundNonInt = false;
$args = func_get_args();
foreach ($args as $arg) {
if (!is_int($arg)) {
$foundNonInt = true;
break;
}
}
return !$foundNonInt;
} | Check if all parameters to the current function are integers
@param mixed
@return boolean true if all parameters are integers | checkAllIntegers | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/WsMessageUtility.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/WsMessageUtility.php | Apache-2.0 |
protected function checkAnyTrue()
{
$foundTrue = false;
$args = func_get_args();
foreach ($args as $arg) {
if ($arg === true) {
$foundTrue = true;
break;
}
}
return $foundTrue;
} | Check if any parameter to the current function is true
@param mixed
@return boolean true if at least 1 parameter is true | checkAnyTrue | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/WsMessageUtility.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/WsMessageUtility.php | Apache-2.0 |
protected function loadBare(PnrAddMultiElementsOptions $params)
{
$tattooCounter = 0;
if (!is_null($params->actionCode)) {
$this->pnrActions = new AddMultiElements\PnrActions(
$params->actionCode
);
}
if (!is_null($params->recordLocator)) {
$this->reservationInfo = new AddMultiElements\ReservationInfo($params->recordLocator);
}
if ($params->travellerGroup !== null) {
$this->addTravellerGroup($params->travellerGroup);
} else {
$this->addTravellers($params->travellers);
}
$this->addItineraries($params->itineraries, $params->tripSegments, $tattooCounter);
if (!empty($params->elements)) {
$this->addElements(
$params->elements,
$tattooCounter,
$params->autoAddReceivedFrom,
$params->defaultReceivedFrom,
$params->receivedFrom
);
} else {
$this->addReceivedFrom(
$params->receivedFrom,
$params->autoAddReceivedFrom,
$params->defaultReceivedFrom,
$tattooCounter
);
}
} | PNR_AddMultiElements call which only adds requested data to the message
For doing specific actions like ignoring or saving PNR.
@param PnrAddMultiElementsOptions $params
@throws \ReflectionException | loadBare | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements.php | Apache-2.0 |
protected function loadCreatePnr(PnrCreatePnrOptions $params)
{
$this->pnrActions = new AddMultiElements\PnrActions(
$params->actionCode
);
$tattooCounter = 0;
if ($params->travellerGroup !== null) {
$this->addTravellerGroup($params->travellerGroup);
} else {
$this->addTravellers($params->travellers);
}
$this->addItineraries($params->itineraries, $params->tripSegments, $tattooCounter);
$this->addElements(
$params->elements,
$tattooCounter,
$params->autoAddReceivedFrom,
$params->defaultReceivedFrom,
$params->receivedFrom
);
} | Make PNR_AddMultiElements structure from a PnrCreatePnrOptions input.
@throws InvalidArgumentException When invalid input is provided
@param PnrCreatePnrOptions $params
@throws \ReflectionException | loadCreatePnr | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements.php | Apache-2.0 |
protected function addReceivedFrom($explicitRf, $doAutoAdd, $defaultRf, &$tattooCounter)
{
if ($this->dataElementsMaster === null) {
$this->dataElementsMaster = new DataElementsMaster();
}
if (!empty($explicitRf) || ($doAutoAdd && !empty($defaultRf))) {
//Set a received from if explicitly provided or if auto received from is enabled
$tattooCounter++;
$rfToAdd = (!empty($explicitRf)) ? $explicitRf : $defaultRf;
$this->dataElementsMaster->dataElementsIndiv[] = $this->createElement(
new ReceivedFrom(['receivedFrom' => $rfToAdd]),
$tattooCounter
);
}
} | Add Received From field - if needed.
@param string|null $explicitRf Explicitly provided RF string on request.
@param bool $doAutoAdd Wether to automatically add an RF field.
@param string|null $defaultRf The default RF string set in the client.
@param int $tattooCounter (BYREF)
@throws \ReflectionException | addReceivedFrom | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements.php | Apache-2.0 |
public function __construct($options)
{
// Determine retrieval type depending on which options were provided.
// Also, maintain backwards compatibility with how this message previously worked:
// Warning, this won't work when combining options. In that case you'll get a soapfault from Amadeus.
if (is_null($options->retrievalType)) {
if (!empty($options->recordLocator)) {
$options->retrievalType = self::RETR_TYPE_BY_RECLOC;
} elseif (!empty($options->customerProfile)) {
$options->retrievalType = self::RETR_TYPE_BY_CUSTOMER_PROFILE;
} elseif (!empty($options->accountNumber)) {
$options->retrievalType = self::RETR_TYPE_BY_ACCOUNT_NUMBER;
} elseif (!empty($options->frequentTraveller)) {
$options->retrievalType = self::RETR_TYPE_BY_FREQUENT_TRAVELLER;
} elseif ($this->checkAnyNotEmpty($options->service)) {
$options->retrievalType = self::RETR_TYPE_BY_SERVICE_AND_NAME;
} elseif ($this->checkAnyNotEmpty($options->lastName, $options->officeId)) {
$options->retrievalType = self::RETR_TYPE_BY_OFFICE_AND_NAME;
} elseif (!$options->recordLocator) {
$options->retrievalType = self::RETR_TYPE_ACTIVE_PNR;
}
}
$this->retrievalFacts = new Retrieve\RetrievalFacts($options);
} | Construct PNR_Retrieve message
@param PnrRetrieveOptions $options | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/Retrieve.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/Retrieve.php | Apache-2.0 |
public function __construct($options)
{
if (!empty($options->recordLocator)) {
$this->recordLocator = new RecordLocator($options->recordLocator);
}
if ($options->inhibitPropagation === true) {
$this->propagatioAction = new PropagationAction(
PropagationAction::PROPAGATION_INHIBIT
);
}
$this->loadNewOffice($options);
if (!empty($options->newThirdParty)) {
$this->oaIdentificator = new OaIdentificator($options->newThirdParty);
}
} | TransferOwnership constructor.
@param PnrTransferOwnershipOptions $options | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/TransferOwnership.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/TransferOwnership.php | Apache-2.0 |
public function __construct($option)
{
$this->selectionDetails = new SelectionDetails($option);
} | RedundantElements constructor.
@param string $option | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/DisplayHistory/RedundantElements.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/DisplayHistory/RedundantElements.php | Apache-2.0 |
public function __construct($segmentName)
{
$this->segmentName = $segmentName;
} | PredicateElementType constructor.
@param string $segmentName self::SEGNAME_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateElementType.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateElementType.php | Apache-2.0 |
public function __construct($freeText)
{
$this->freeTextDetails = new FreeTextDetails();
$this->freeText = $freeText;
} | PredicateFreeText constructor.
@param string $freeText | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateFreeText.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateFreeText.php | Apache-2.0 |
public function __construct($min, $max)
{
$this->rangeDetails = new RangeDetails($min, $max);
} | PredicateEnvRange constructor.
@param int $min
@param int $max | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateEnvRange.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateEnvRange.php | Apache-2.0 |
public function __construct($option, $optionInformation = self::OPTINF_PREDICATE_TYPE)
{
$this->option = $option;
$this->optionInformation = $optionInformation;
} | PredicateSelectionDetails constructor.
@param string $option self::OPT_*
@param int $optionInformation self::OPTINF_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateSelectionDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/DisplayHistory/PredicateSelectionDetails.php | Apache-2.0 |
public function __construct($inHouseIdentification1 = null, $inHouseIdentification2 = null)
{
$this->officeIdentificator = new OfficeIdentificator(
$inHouseIdentification1,
$inHouseIdentification2
);
} | OfficeIdentification constructor.
@param string|null $inHouseIdentification1
@param string|null $inHouseIdentification2 | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/TransferOwnership/OfficeIdentification.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/TransferOwnership/OfficeIdentification.php | Apache-2.0 |
public function __construct($inHouseIdentification1, $inHouseIdentification2)
{
$this->inHouseIdentification1 = $inHouseIdentification1;
$this->inHouseIdentification2 = $inHouseIdentification2;
} | OriginatorDetails constructor.
@param string|null $inHouseIdentification1
@param string|null $inHouseIdentification2 | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/TransferOwnership/OriginatorDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/TransferOwnership/OriginatorDetails.php | Apache-2.0 |
public function __construct($actionRequestCode)
{
$this->actionRequestCode = $actionRequestCode;
} | PropagationAction constructor.
@param string $actionRequestCode self::PROPAGATION_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/TransferOwnership/PropagationAction.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/TransferOwnership/PropagationAction.php | Apache-2.0 |
public function __construct($dateOfBirth)
{
$this->dateTime = new DateTime($dateOfBirth);
} | DateOfBirthInEnhancedPaxData constructor.
@param \DateTime $dateOfBirth | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/NameChange/DateOfBirthInEnhancedPaxData.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/NameChange/DateOfBirthInEnhancedPaxData.php | Apache-2.0 |
public function __construct($paxRef)
{
$this->reference = new Reference($paxRef);
} | ElementManagementPassenger constructor.
@param int $paxRef Passenger Reference | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/NameChange/ElementManagementPassenger.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/NameChange/ElementManagementPassenger.php | Apache-2.0 |
public function __construct($identifier, $type = null, $infantIndicator = null)
{
$this->quantity = 1;
$this->uniqueCustomerIdentifier = $identifier;
$this->type = $type;
$this->infantIndicator = $infantIndicator;
} | TravellerNameInfo constructor.
@param int $identifier
@param string|null $type
@param string|int|null $infantIndicator | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/NameChange/TravellerNameInfo.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/NameChange/TravellerNameInfo.php | Apache-2.0 |
public function __construct($surname, $givenName, $title = null)
{
$this->surname = $surname;
$this->givenName = $givenName;
$this->title = $title;
} | OtherPaxNamesDetails constructor.
@param string $surname
@param string $givenName
@param string|null $title | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/NameChange/OtherPaxNamesDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/NameChange/OtherPaxNamesDetails.php | Apache-2.0 |
public function __construct($passenger)
{
$this->elementManagementPassenger = new ElementManagementPassenger($passenger->reference);
$infantIndicator = $this->makeInfantIndicator($passenger->infant);
$this->enhancedPassengerInformation[] = $this->makeMainPax($passenger, $infantIndicator);
if ($infantIndicator > 1) {
$this->enhancedPassengerInformation[] = $this->makeInfant($passenger->reference, $passenger->infant);
}
} | EnhancedPassengerGroup constructor.
@param Passenger $passenger | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/NameChange/EnhancedPassengerGroup.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/NameChange/EnhancedPassengerGroup.php | Apache-2.0 |
public function __construct($options)
{
$this->retrieve = new Retrieve(
$options->retrievalType,
$options->officeId,
$options->options
);
if ($this->checkAnyNotEmpty($options->accountNumber)) {
$this->accounting = new Accounting($options->accountNumber);
}
if ($this->checkAnyNotEmpty($options->recordLocator, $options->customerProfile)) {
$controlNumber = $options->retrievalType === RetrieveMsg::RETR_TYPE_BY_CUSTOMER_PROFILE
? $options->customerProfile
: $options->recordLocator;
$this->reservationOrProfileIdentifier = new ReservationOrProfileIdentifier($controlNumber);
}
if ($this->checkAnyNotEmpty(
$options->lastName,
$options->departureDate,
$options->ticket,
$options->company,
$options->flightNumber,
)) {
$this->personalFacts = new PersonalFacts(
$options->lastName,
$options->departureDate,
$options->ticket,
$options->company,
$options->flightNumber
);
}
if ($options->frequentTraveller instanceof FrequentTraveller) {
$this->frequentFlyer = new FrequentFlyer($options->frequentTraveller);
}
} | Construct retrievalFacts element
@param PnrRetrieveOptions $options | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/Retrieve/RetrievalFacts.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/Retrieve/RetrievalFacts.php | Apache-2.0 |
public function __construct($surName)
{
$this->traveller = new Traveller($surName);
} | TravellerInformation constructor.
@param $surName | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/Retrieve/TravellerInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/Retrieve/TravellerInformation.php | Apache-2.0 |
public function __construct($departureDate, $company, $flightNumber)
{
if ($departureDate instanceof \DateTime) {
$this->product = new Product($departureDate);
}
if ($company) {
$this->company = new Company($company);
}
if ($flightNumber) {
$this->productDetails = new ProductDetails($flightNumber);
}
} | ProductInformation constructor.
@param \DateTime|null $departureDate
@param string|null $company
@param string|null $flightNumber | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/Retrieve/ProductInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/Retrieve/ProductInformation.php | Apache-2.0 |
public function __construct(AddressOptions $params)
{
$this->informationType = $this->makeType($params->type);
$this->address = new Address($params->addressLine1);
if (!empty($params->addressLine2)) {
$this->optionalData[] = new OptionalData(
$params->addressLine2,
OptionalData::OPT_ADDRESS_LINE_2
);
};
if (!empty($params->city)) {
$this->optionalData[] = new OptionalData(
$params->city,
OptionalData::OPT_CITY
);
};
if (!empty($params->country)) {
$this->optionalData[] = new OptionalData(
$params->country,
OptionalData::OPT_COUNTRY
);
};
if (!empty($params->name)) {
$this->optionalData[] = new OptionalData(
$params->name,
OptionalData::OPT_NAME
);
};
if (!empty($params->state)) {
$this->optionalData[] = new OptionalData(
$params->state,
OptionalData::OPT_STATE
);
};
if (!empty($params->zipCode)) {
$this->optionalData[] = new OptionalData(
$params->zipCode,
OptionalData::OPT_ZIP_CODE
);
};
if (!empty($params->company)) {
$this->optionalData[] = new OptionalData(
$params->company,
OptionalData::OPT_COMPANY
);
};
} | StructuredAddress constructor.
@param AddressOptions $params | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/StructuredAddress.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/StructuredAddress.php | Apache-2.0 |
public static function isValidFopType($fopType)
{
return ($fopType == self::IDENT_CASH
|| $fopType == self::IDENT_CHECK
|| $fopType == self::IDENT_CREDITCARD
|| $fopType == self::IDENT_MISC);
} | Check if the given Form Of Payment type is valid
@param string $fopType
@return boolean | isValidFopType | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/Fop.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/Fop.php | Apache-2.0 |
public function __construct($segmentName = null, $tattoo = null)
{
if (!is_null($segmentName)) {
$this->segmentName = $segmentName;
}
if (!is_null($tattoo) && is_int($tattoo)) {
$this->reference = new Reference(Reference::QUAL_OTHER, $tattoo);
}
} | Create new ElementManagementData
@param string|null $segmentName one of the constants SEGNAME_* defined in this class
@param int|null $tattoo Optional tattoo nr to reference this element | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/ElementManagementData.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/ElementManagementData.php | Apache-2.0 |
protected function makeSegmentNameForRequestElement($elementType, $element)
{
$elementName = '';
$sourceArray = [
'Contact' => ElementManagementData::SEGNAME_CONTACT_ELEMENT,
'FormOfPayment' => ElementManagementData::SEGNAME_FORM_OF_PAYMENT,
'MiscellaneousRemark' => ElementManagementData::SEGNAME_GENERAL_REMARK,
'ReceivedFrom' => ElementManagementData::SEGNAME_RECEIVE_FROM,
'ServiceRequest' => ElementManagementData::SEGNAME_SPECIAL_SERVICE_REQUEST,
'Ticketing' => ElementManagementData::SEGNAME_TICKETING_ELEMENT,
'AccountingInfo' => ElementManagementData::SEGNAME_ACCOUNTING_INFORMATION,
'Address' => null, // Special case - the type is a parameter.
'FrequentFlyer' => ElementManagementData::SEGNAME_SPECIAL_SERVICE_REQUEST,
'OtherServiceInfo' => ElementManagementData::SEGNAME_OTHER_SERVICE_INFORMATION,
'ManualCommission' => ElementManagementData::SEGNAME_COMMISSION,
'SeatRequest' => ElementManagementData::SEGNAME_SEAT_REQUEST,
'TourCode' => ElementManagementData::SEGNAME_TOUR_CODE,
'ManualIssuedTicket' => ElementManagementData::SEGNAME_MANUAL_DOCUMENT_REGISTRATION_WITH_ET_NUMBER,
'ScheduleChange' => ElementManagementData::SEGNAME_RECEIVE_FROM,
'FareMiscellaneousInformation' => null, // Special case - the type is a parameter.
'PnrSecurity' => ElementManagementData::SEGNAME_INDIVIDUAL_SECURITY,
];
if (array_key_exists($elementType, $sourceArray)) {
$elementName = $sourceArray[$elementType];
if ($elementType === 'Address') {
/** @var Element\Address $element */
$elementName = $element->type;
}
if ($elementType === 'FareMiscellaneousInformation') {
/** @var Element\FareMiscellaneousInformation $element */
switch ($element->indicator) {
case Element\FareMiscellaneousInformation::GENERAL_INDICATOR_FS:
$elementName = ElementManagementData::SEGNAME_MISC_TICKET_INFO;
break;
case Element\FareMiscellaneousInformation::GENERAL_INDICATOR_FE:
$elementName = ElementManagementData::SEGNAME_ENDORSEMENT;
break;
case Element\FareMiscellaneousInformation::GENERAL_INDICATOR_FK:
$elementName = ElementManagementData::SEGNAME_AIR_OFFICE_ID;
break;
case Element\FareMiscellaneousInformation::GENERAL_INDICATOR_FZ:
$elementName = ElementManagementData::SEGNAME_MISC_INFO;
break;
}
}
}
return $elementName;
} | Create the correct element identifier for a given element
@param string $elementType
@param Element $element
@return string | makeSegmentNameForRequestElement | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/DataElementsIndiv.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/DataElementsIndiv.php | Apache-2.0 |
public function __construct($tattooNr, $segmentName)
{
$this->segmentName = $segmentName;
$this->reference = new Reference(Reference::QUAL_OTHER, $tattooNr);
} | ElementManagementItinerary constructor.
@param int $tattooNr
@param string $segmentName | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/ElementManagementItinerary.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/ElementManagementItinerary.php | Apache-2.0 |
public function __construct($params)
{
$this->companyId = $params->airline;
$this->membershipNumber = $params->number;
} | FrequentTraveller constructor.
@param FrequentFlyerOpt|FrequentTravellerOpt $params | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/FrequentTraveller.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/FrequentTraveller.php | Apache-2.0 |
public function __construct($passengerType, $companyId, $ticketNumber)
{
$this->passengerType = $passengerType;
$this->document = new ManualDocument($companyId, $ticketNumber);
} | ManualDocumentRegistration constructor.
@param string $passengerType
@param string $companyId
@param string $ticketNumber | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/ManualDocumentRegistration.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/ManualDocumentRegistration.php | Apache-2.0 |
public function __construct($cityCode)
{
$this->cityCode = $cityCode;
} | BoardOffPointDetail constructor.
@param string $cityCode | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/BoardOffPointDetail.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/BoardOffPointDetail.php | Apache-2.0 |
public function __construct($origin = null, $destination = null)
{
$this->origin = $origin;
$this->destination = $destination;
} | OriginDestination constructor.
@param string|null $origin
@param string|null $destination | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/OriginDestination.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/OriginDestination.php | Apache-2.0 |
public function __construct($option)
{
$this->selection[] = new Selection($option);
} | SelectionDetailsAir constructor.
@param string $option SelectionDetailsAir::OPT_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/SelectionDetailsAir.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/SelectionDetailsAir.php | Apache-2.0 |
protected function addInfant($traveller)
{
$this->passengerData[0]->travellerInformation->traveller->quantity = 2;
if ($traveller->withInfant && is_null($traveller->infant)) {
$this->makePassengerIfNeeded();
$this->passengerData[0]->travellerInformation->passenger[0]->infantIndicator = Passenger::INF_NOINFO;
} elseif ($traveller->infant instanceof TravellerOptions) {
if (empty($traveller->infant->lastName)) {
$this->makePassengerIfNeeded();
$this->passengerData[0]->travellerInformation->passenger[0]->infantIndicator = Passenger::INF_GIVEN;
$tmpInfantPassenger = new Passenger(
$traveller->infant->firstName,
Passenger::PASST_INFANT
);
$this->passengerData[0]->travellerInformation->passenger[] = $tmpInfantPassenger;
} else {
$this->makePassengerIfNeeded();
$this->passengerData[0]->travellerInformation->passenger[0]->infantIndicator = Passenger::INF_FULL;
$tmpInfant = new PassengerData($traveller->infant->lastName);
$tmpInfant->travellerInformation->passenger[] = new Passenger(
$traveller->infant->firstName,
Passenger::PASST_INFANT
);
if ($traveller->infant->dateOfBirth instanceof \DateTime) {
$tmpInfant->dateOfBirth = new DateOfBirth(
$this->formatDateOfBirth($traveller->infant->dateOfBirth)
);
}
$this->passengerData[] = $tmpInfant;
}
}
} | Add infant
3 scenario's:
- infant without additional information
- infant with only first name provided
- infant with first name, last name & date of birth provided.
@param TravellerOptions $traveller | addInfant | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/TravellerInfo.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/TravellerInfo.php | Apache-2.0 |
protected function makePassengerIfNeeded()
{
if (count($this->passengerData[0]->travellerInformation->passenger) < 1) {
$this->passengerData[0]->travellerInformation->passenger[0] = new Passenger(null, null);
}
} | If there is no passenger node at
$travellerInfo->passengerData[0]->travellerInformation->passenger[0]
create one | makePassengerIfNeeded | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/TravellerInfo.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/TravellerInfo.php | Apache-2.0 |
public function __construct($freeText)
{
$this->longFreetext = $freeText;
$this->freetextDetail = new FreetextDetail(null);
} | FreetextItinerary constructor.
@param string $freeText | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/FreetextItinerary.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/FreetextItinerary.php | Apache-2.0 |
public function __construct(FrequentFlyer $params)
{
$this->frequentTraveller = new FrequentTraveller($params);
} | FrequentTravellerData constructor.
@param FrequentFlyer $params | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Pnr/AddMultiElements/FrequentTravellerData.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Pnr/AddMultiElements/FrequentTravellerData.php | Apache-2.0 |
protected function upperOrNull($param)
{
return (!is_null($param)) ? strtoupper($param) : $param;
} | Converts string to uppercase or null if null.
@param string|null $param
@return string|null | upperOrNull | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Info/EncodeDecodeCity.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Info/EncodeDecodeCity.php | Apache-2.0 |
public function __construct($code, $name = null)
{
$this->code = $code;
$this->name = $name;
} | LocationDescription constructor.
@param string|null $code
@param string|null $name | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Info/LocationDescription.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Info/LocationDescription.php | Apache-2.0 |
public function __construct($type = self::TYPE_LOCATION, $code = null, $name = null)
{
$this->locationType = $type;
$this->locationDescription = new LocationDescription($code, $name);
} | LocationInformation constructor.
@param string $type
@param string|null $code
@param string|null $name | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Info/LocationInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Info/LocationInformation.php | Apache-2.0 |
public function __construct($countryCode, $stateCode = null)
{
$this->countryCode = $countryCode;
$this->stateCode = $stateCode;
} | CountryIdentification constructor.
@param string $countryCode
@param string|null $stateCode | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Info/CountryIdentification.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Info/CountryIdentification.php | Apache-2.0 |
public function __construct($countryCode, $stateCode = null)
{
$this->countryIdentification = new CountryIdentification($countryCode, $stateCode);
} | CountryStateRestriction constructor.
@param string $countryCode
@param string|null $stateCode | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Info/CountryStateRestriction.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Info/CountryStateRestriction.php | Apache-2.0 |
public function __construct(SegmentOptions $seg)
{
$this->travelProductInformation = new TravelProductInformation(
$seg->departureDate,
$seg->from,
$seg->to,
$seg->companyCode,
$seg->flightNumber,
$seg->bookingClass,
$seg->arrivalDate,
$seg->arrivalTime,
$seg->dateVariation,
$seg->flightTypeDetails
);
$this->relatedproductInformation = new RelatedproductInformation(
$seg->nrOfPassengers,
$seg->statusCode
);
} | SegmentInformation constructor.
@param SegmentOptions $seg | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/SegmentInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/SegmentInformation.php | Apache-2.0 |
public function __construct($messageFunction)
{
$this->messageFunction = $messageFunction;
} | MessageFunctionDetails constructor.
@param string $messageFunction | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MessageFunctionDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MessageFunctionDetails.php | Apache-2.0 |
public function setArrivalDate(\DateTime $arrivalDate)
{
$this->arrivalDate = $arrivalDate->format('dmy') !== '000000' ? $arrivalDate->format($this->dateFormat) : null;
$time = $arrivalDate->format('Hi');
if ($time !== '0000') {
$this->arrivalTime = $time;
}
} | Load Arrival date info from \DateTime
@param \DateTime $arrivalDate | setArrivalDate | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/FlightDate.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/FlightDate.php | Apache-2.0 |
public function __construct($indicator)
{
$this->flightIndicator[] = $indicator;
} | FlightTypeDetails constructor.
@param string $indicator | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/FlightTypeDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/FlightTypeDetails.php | Apache-2.0 |
public function __construct($quantity, $statusCode)
{
$this->quantity = $quantity;
$this->statusCode = $statusCode;
} | RelatedproductInformation constructor.
@param int $quantity
@param string $statusCode | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RelatedproductInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RelatedproductInformation.php | Apache-2.0 |
public function __construct(AirMultiAvailabilityOptions $params)
{
$this->messageActionDetails = new MultiAvailability\MessageActionDetails(
$params->actionCode,
$params->businessFunction
);
if (count($params->requestOptions) > 0) {
foreach ($params->requestOptions as $requestOption) {
if ($this instanceof MultiAvailability16) {
$this->requestSection[] = new RequestSection16($requestOption);
} else {
$this->requestSection[] = new RequestSection($requestOption);
}
}
}
$this->loadOptionalParams($params);
} | MultiAvailability constructor.
@param AirMultiAvailabilityOptions $params | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability.php | Apache-2.0 |
public function __construct(
$departureDate,
$from,
$to,
$company,
$flightNumber,
$bookingClass,
$arrivalDate = null,
$arrivalTime = null,
$dateVariation = null,
$flightTypeDetails = null
) {
$this->flightDate = $this->parseFlightDate($departureDate, $arrivalDate, $arrivalTime, $dateVariation);
$this->boardPointDetails = new PointDetails($from);
$this->offpointDetails = new PointDetails($to);
$this->companyDetails = new CompanyDetails($company);
$this->flightIdentification = new FlightIdentification($flightNumber, $bookingClass);
if (!is_null($flightTypeDetails)) {
$this->flightTypeDetails = new FlightTypeDetails($flightTypeDetails);
}
} | TravelProductInformation constructor.
@param \DateTime $departureDate
@param string $from
@param string $to
@param string $company
@param string $flightNumber
@param string $bookingClass
@param \DateTime|null $arrivalDate
@param string|\DateTime|null $arrivalTime
@param int|null $dateVariation
@param string|null $flightTypeDetails | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/TravelProductInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/TravelProductInformation.php | Apache-2.0 |
public function __construct($flightNumber, $bookingClass = null, $operationalSuffix = null)
{
$this->flightNumber = $flightNumber;
$this->bookingClass = $bookingClass;
$this->operationalSuffix = $operationalSuffix;
} | FlightIdentification constructor.
@param string $flightNumber
@param string|null $bookingClass
@param string|null $operationalSuffix | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/FlightIdentification.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/FlightIdentification.php | Apache-2.0 |
public function __construct($messageFunction)
{
$this->messageFunctionDetails = new MessageFunctionDetails($messageFunction);
} | MessageActionDetails constructor.
@param string $messageFunction | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MessageActionDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MessageActionDetails.php | Apache-2.0 |
public function __construct($airlines, $flightNumber = null, $indicator = null)
{
foreach ($airlines as $count => $airline) {
if ($count === 0) {
$this->flightIdentification[] = new FlightIdentification($airline, $flightNumber);
} else {
$this->flightIdentification[] = new FlightIdentification($airline);
}
}
$this->excludeAirlineIndicator = $indicator;
} | AirlineOrFlightOption constructor.
@param string[] $airlines
@param string|null $flightNumber
@param int|null $indicator | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/AirlineOrFlightOption.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/AirlineOrFlightOption.php | Apache-2.0 |
public function __construct($requestType)
{
$this->typeOfRequest = $requestType;
} | AvailabilityOptions constructor.
@param string $requestType self::::REQ_TYPE_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityOptions16.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityOptions16.php | Apache-2.0 |
public function __construct($departureDate, $arrivalDate = null)
{
if ($departureDate instanceof \DateTime) {
$depArr = $this->loadDateInfo($departureDate);
$this->departureDate = $depArr['date'];
$this->departureTime = $depArr['time'];
}
if ($arrivalDate instanceof \DateTime) {
$arrArr = $this->loadDateInfo($arrivalDate);
$this->arrivalDate = $arrArr['date'];
$this->arrivalTime = $arrArr['time'];
}
} | AvailabilityDetails constructor.
@param \DateTime $departureDate
@param \DateTime|null $arrivalDate | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityDetails.php | Apache-2.0 |
public function __construct($carrier, $number, $refType = null)
{
$this->carrier = $carrier;
$this->number = $number;
$this->referenceType = $refType;
} | FrequentTravellerDetails constructor.
@param string $carrier
@param string $number
@param string|null $refType self::REFTYPE_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/FrequentTravellerDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/FrequentTravellerDetails.php | Apache-2.0 |
public function __construct(FrequentTravellerOptions $frequentTraveller)
{
$this->travellerDetails = new TravellerDetails(
$frequentTraveller->lastName,
$frequentTraveller->firstName
);
$this->travelleridentification = new Travelleridentification(
$frequentTraveller->carrier,
$frequentTraveller->number,
$frequentTraveller->referenceType
);
} | FrequentTraveller constructor.
@param FrequentTravellerOptions $frequentTraveller | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/FrequentTraveller.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/FrequentTraveller.php | Apache-2.0 |
public function __construct($customerNumber)
{
$this->customerReferences[] = new CustomerReferences($customerNumber);
} | ConsumerReferenceInformation constructor.
@param string $customerNumber | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/ConsumerReferenceInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/ConsumerReferenceInformation.php | Apache-2.0 |
public function __construct($from, $to, $departureDate, $arrivalDate = null)
{
$this->availabilityDetails[] = new AvailabilityDetails(
$departureDate,
$arrivalDate
);
$this->departureLocationInfo = new LocationInfo($from);
$this->arrivalLocationInfo = new LocationInfo($to);
} | AvailabilityProductInfo constructor.
@param string $from
@param string $to
@param \DateTime $departureDate
@param \DateTime|null $arrivalDate | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityProductInfo.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityProductInfo.php | Apache-2.0 |
public function __construct($requestType)
{
$this->productTypeDetails = new ProductTypeDetails($requestType);
} | AvailabilityOptions constructor.
@param string $requestType ProductTypeDetails::REQ_TYPE_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityOptions.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/AvailabilityOptions.php | Apache-2.0 |
public function __construct($bookingClass)
{
$this->serviceClass = $bookingClass;
} | ProductClassDetails constructor.
@param string $bookingClass | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/ProductClassDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/ProductClassDetails.php | Apache-2.0 |
public function __construct($point, $date)
{
$this->location = $point;
if ($date instanceof \DateTime) {
$this->date = $date->format('dmy');
$time = $date->format('Hi');
if ($time !== '0000') {
$this->time = $time;
}
}
} | PointOfCommencement constructor.
@param string $point
@param \DateTime|null $date | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/PointOfCommencement.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/PointOfCommencement.php | Apache-2.0 |
public function __construct($number)
{
$this->referenceNumber = $number;
} | CustomerReferences constructor.
@param string $number | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/CustomerReferences.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/CustomerReferences.php | Apache-2.0 |
public function __construct($carrier, $number, $refType = null)
{
$this->frequentTravellerDetails = new FrequentTravellerDetails(
$carrier,
$number,
$refType
);
} | Travelleridentification constructor.
@param string $carrier
@param string $number
@param string|null $refType | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/Travelleridentification.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/Travelleridentification.php | Apache-2.0 |
public function __construct($airline, $flightNumber = null)
{
$this->airlineCode = $airline;
$this->number = $flightNumber;
} | FlightIdentification constructor.
@param string $airline Airline code
@param string|null $flightNumber | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/FlightIdentification.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/FlightIdentification.php | Apache-2.0 |
public function __construct($actionCode, $businessFunction = null)
{
$this->functionDetails = new FunctionDetails($actionCode, $businessFunction);
} | MessageActionDetails constructor.
@param int|string|null $actionCode
@param int|string|null $businessFunction | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/MessageActionDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/MessageActionDetails.php | Apache-2.0 |
public function __construct($type)
{
$this->typeOfRequest = $type;
} | ProductTypeDetails constructor.
@param string $type self::REQ_TYPE_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/ProductTypeDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/ProductTypeDetails.php | Apache-2.0 |
public function __construct($numberOfPassengers)
{
$this->numberOfPassengers = $numberOfPassengers;
} | NumberOfSeatsInfo constructor.
@param int $numberOfPassengers | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/MultiAvailability/NumberOfSeatsInfo.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/MultiAvailability/NumberOfSeatsInfo.php | Apache-2.0 |
public function __construct($optionInformation)
{
$this->selectionDetails = new SelectionDetails($optionInformation);
} | BestPricerRecommendation constructor.
@param int $optionInformation | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RebookAirSegment/BestPricerRecommendation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RebookAirSegment/BestPricerRecommendation.php | Apache-2.0 |
public function __construct($action)
{
$this->statusInformation[] = new StatusInformation($action);
} | ProcessIndicators constructor.
@param string $action | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/ProcessIndicators.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/ProcessIndicators.php | Apache-2.0 |
public function __construct(FrequentFlyer $frequentFlyer)
{
$this->carrier = $frequentFlyer->company;
$this->number = $frequentFlyer->cardNumber;
$this->tierLevel = $frequentFlyer->tierLevel;
$this->type = $frequentFlyer->type;
} | FrequentTravellerDetails constructor.
@param FrequentFlyer $frequentFlyer | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/FrequentTravellerDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/FrequentTravellerDetails.php | Apache-2.0 |
public function __construct($rateClass)
{
$this->rateClass = $rateClass;
} | AdditionalFareDetails constructor.
@param string $rateClass | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/AdditionalFareDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/AdditionalFareDetails.php | Apache-2.0 |
public function __construct($freqTrav)
{
$this->frequentTravellerDetails = new FrequentTravellerDetails($freqTrav);
} | FrequentTravelerDetails constructor.
@param FrequentFlyer $freqTrav | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/FrequentTravelerDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/FrequentTravelerDetails.php | Apache-2.0 |
public function __construct($action)
{
$this->action = $action;
} | StatusInformation constructor.
@param string $action | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/StatusInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/StatusInformation.php | Apache-2.0 |
public function __construct(FrequentFlyer $frequentFlyer)
{
$this->frequentTravellerDetails = new FrequentTravellerDetails($frequentFlyer);
} | FrequentTravelerInfo constructor.
@param FrequentFlyer $frequentFlyer | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/FrequentTravelerInfo.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/FrequentTravelerInfo.php | Apache-2.0 |
public function __construct($travellerOpt)
{
$this->paxDetails = new PaxDetails($travellerOpt->lastName);
$this->paxDetails->quantity = 1;
if (!empty($travellerOpt->firstName) || !empty($travellerOpt->type) || !empty($travellerOpt->uniqueId)) {
$this->otherPaxDetails[] = new OtherPaxDetails($travellerOpt->firstName);
$this->otherPaxDetails[0]->type = $travellerOpt->type;
$this->otherPaxDetails[0]->uniqueCustomerIdentifier = $travellerOpt->uniqueId;
}
} | TravelerInformation constructor.
@param TravellerOpt $travellerOpt | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/TravelerInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/TravelerInformation.php | Apache-2.0 |
public function __construct($cabinClass, $withPrices = false)
{
if (!is_null($cabinClass)) {
$this->genericDetails = new GenericDetails($cabinClass);
}
if ($withPrices) {
$this->processingIndicator = self::INDICATOR_FARE_TAX_TOTAL;
}
} | SeatRequestParameters constructor.
@param string|null $cabinClass
@param bool $withPrices | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/SeatRequestParameters.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/SeatRequestParameters.php | Apache-2.0 |
public function __construct(FlightInfo $flightInfo)
{
$this->flightDate = new FlightDate($flightInfo->departureDate);
$this->boardPointDetails = new PointDetails($flightInfo->departure);
$this->offpointDetails = new PointDetails($flightInfo->arrival);
$this->companyDetails = new CompanyDetails($flightInfo->airline);
$this->flightIdentification = new FlightIdentification(
$flightInfo->flightNumber,
$flightInfo->bookingClass
);
} | TravelProductIdent constructor.
@param FlightInfo $flightInfo | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/TravelProductIdent.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/TravelProductIdent.php | Apache-2.0 |
public function __construct($currency)
{
$this->currency = $currency;
} | ConversionRateDetails constructor.
@param string $currency | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/ConversionRateDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/ConversionRateDetails.php | Apache-2.0 |
public function __construct(\DateTime $date)
{
$this->date = $date->format('dmY');
} | DateAndTimeDetails constructor.
@param \DateTime $date | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/Air/RetrieveSeatMap/DateAndTimeDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/Air/RetrieveSeatMap/DateAndTimeDetails.php | Apache-2.0 |
public function __construct($consumerId)
{
$this->Consumer = new Consumer($consumerId);
} | TransactionFlowLink constructor.
@param string $consumerId | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/HeaderV4/TransactionFlowLink.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/HeaderV4/TransactionFlowLink.php | Apache-2.0 |
public function __construct($pricingId)
{
$this->uniqueReference = $pricingId;
} | FareRecommendationId constructor.
@param int|string $pricingId a reference or self::PRICING_ID_ALL | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/MiniRule/FareRecommendationId.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/MiniRule/FareRecommendationId.php | Apache-2.0 |
public function __construct($stockTypeCode, $stockProvider)
{
$this->stockTypeCode = $stockTypeCode;
$this->stockProvider = $stockProvider;
} | StockProviderDetails constructor.
@param string|null $stockTypeCode
@param string|null $stockProvider | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/DocRefund/StockProviderDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/DocRefund/StockProviderDetails.php | Apache-2.0 |
public function __construct($actionRequest)
{
$this->actionRequest = $actionRequest;
} | IgnoreInformation constructor.
@param string $actionRequest | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/DocRefund/IgnoreInformation.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/DocRefund/IgnoreInformation.php | Apache-2.0 |
public function __construct($couponNumber)
{
$this->couponDetails = new CouponDetails($couponNumber);
} | PaperCouponOfDocNumber constructor.
@param int|string $couponNumber | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/DocRefund/PaperCouponOfDocNumber.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/DocRefund/PaperCouponOfDocNumber.php | Apache-2.0 |
public function __construct($number, $type = null)
{
$this->number = $number;
$this->type = $type;
} | ItemNumberDetails constructor.
@param int|string $number
@param string|null $type self::TYPE_* | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/DocRefund/ItemNumberDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/DocRefund/ItemNumberDetails.php | Apache-2.0 |
public function __construct($ticketNumber)
{
$this->documentDetails = new DocumentDetails($ticketNumber);
} | DocumentNumberDetails constructor.
@param string $ticketNumber | __construct | php | amabnl/amadeus-ws-client | src/Amadeus/Client/Struct/DocRefund/DocumentNumberDetails.php | https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Struct/DocRefund/DocumentNumberDetails.php | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.