<?php
namespace App\Sabre\Api\Soap; class PnrManager { static private $instance; static public function getInstance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; } public function getReservation($ConversationId, $BinarySecurityToken, $Locator) { $requestObj = new \App\Sabre\Api\Soap\Operation\GetReservation($ConversationId, $BinarySecurityToken, $Locator); $response = $requestObj->execute(false); $soapEnv = $response->children('soap-env', true); $Body = $soapEnv->Body; $stl19 = $Body->children('stl19', true); $GetReservationRS = $stl19->GetReservationRS; return $GetReservationRS; } public function addRemark($ConversationId, $BinarySecurityToken, $Type, $Text) { $requestObj = new \App\Sabre\Api\Soap\Operation\AddRemark($ConversationId, $BinarySecurityToken, $Type, $Text); $response = $requestObj->execute(); return $response->Body->AddRemarkRS; } public function addBulkRemarks($ConversationId, $BinarySecurityToken, $Type, Array $Texts) { $requestObj = new \App\Sabre\Api\Soap\Operation\AddBulkRemarks($ConversationId, $BinarySecurityToken, $Type, $Texts); $response = $requestObj->execute(); return $response->Body->AddRemarkRS; } public function endTransaction($ConversationId, $BinarySecurityToken, $ReceivedFrom) { $requestObj = new \App\Sabre\Api\Soap\Operation\EndTransaction($ConversationId, $BinarySecurityToken, $ReceivedFrom); $response = $requestObj->execute(); return $response->Body->EndTransactionRS; } public function ignoreTransaction($ConversationId, $BinarySecurityToken) { $requestObj = new \App\Sabre\Api\Soap\Operation\IgnoreTransaction($ConversationId, $BinarySecurityToken); $response = $requestObj->execute(); return $response->Body->IgnoreTransactionRS; } } 