Skip to content

Commit

Permalink
added dirname(__FILE__) before every filename in every instance of re…
Browse files Browse the repository at this point in the history
…quire_once() to fix path resolution error, in MarketplaceWebService
  • Loading branch information
jpsilkjr86 committed Jul 16, 2018
1 parent 19d60c7 commit 4ba07d1
Show file tree
Hide file tree
Showing 73 changed files with 142 additions and 142 deletions.
92 changes: 46 additions & 46 deletions src/MarketplaceWebService/Client.php

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions src/MarketplaceWebService/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Interface
*/
require_once ('MarketplaceWebService/Interface.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Interface.php');

/**
* The Amazon Marketplace Web Service contain APIs for inventory and order management.
Expand All @@ -45,7 +45,7 @@ class MarketplaceWebService_Mock implements MarketplaceWebService_Interface
*/
public function getReport($request)
{
require_once ('MarketplaceWebService/Model/GetReportResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportResponse.php');
return MarketplaceWebService_Model_GetReportResponse::fromXML($this->invoke('GetReport'));
}

Expand All @@ -64,7 +64,7 @@ public function getReport($request)
*/
public function getReportScheduleCount($request)
{
require_once ('MarketplaceWebService/Model/GetReportScheduleCountResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportScheduleCountResponse.php');
return MarketplaceWebService_Model_GetReportScheduleCountResponse::fromXML($this->invoke('GetReportScheduleCount'));
}

Expand All @@ -83,7 +83,7 @@ public function getReportScheduleCount($request)
*/
public function getReportRequestListByNextToken($request)
{
require_once ('MarketplaceWebService/Model/GetReportRequestListByNextTokenResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportRequestListByNextTokenResponse.php');
return MarketplaceWebService_Model_GetReportRequestListByNextTokenResponse::fromXML($this->invoke('GetReportRequestListByNextToken'));
}

Expand All @@ -102,7 +102,7 @@ public function getReportRequestListByNextToken($request)
*/
public function updateReportAcknowledgements($request)
{
require_once ('MarketplaceWebService/Model/UpdateReportAcknowledgementsResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/UpdateReportAcknowledgementsResponse.php');
return MarketplaceWebService_Model_UpdateReportAcknowledgementsResponse::fromXML($this->invoke('UpdateReportAcknowledgements'));
}

Expand All @@ -125,7 +125,7 @@ public function updateReportAcknowledgements($request)
*/
public function submitFeed($request)
{
require_once ('MarketplaceWebService/Model/SubmitFeedResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/SubmitFeedResponse.php');
return MarketplaceWebService_Model_SubmitFeedResponse::fromXML($this->invoke('SubmitFeed'));
}

Expand All @@ -146,7 +146,7 @@ public function submitFeed($request)
*/
public function getReportCount($request)
{
require_once ('MarketplaceWebService/Model/GetReportCountResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportCountResponse.php');
return MarketplaceWebService_Model_GetReportCountResponse::fromXML($this->invoke('GetReportCount'));
}

Expand All @@ -165,7 +165,7 @@ public function getReportCount($request)
*/
public function getFeedSubmissionListByNextToken($request)
{
require_once ('MarketplaceWebService/Model/GetFeedSubmissionListByNextTokenResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetFeedSubmissionListByNextTokenResponse.php');
return MarketplaceWebService_Model_GetFeedSubmissionListByNextTokenResponse::fromXML($this->invoke('GetFeedSubmissionListByNextToken'));
}

Expand All @@ -185,7 +185,7 @@ public function getFeedSubmissionListByNextToken($request)
*/
public function cancelFeedSubmissions($request)
{
require_once ('MarketplaceWebService/Model/CancelFeedSubmissionsResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/CancelFeedSubmissionsResponse.php');
return MarketplaceWebService_Model_CancelFeedSubmissionsResponse::fromXML($this->invoke('CancelFeedSubmissions'));
}

Expand All @@ -204,7 +204,7 @@ public function cancelFeedSubmissions($request)
*/
public function requestReport($request)
{
require_once ('MarketplaceWebService/Model/RequestReportResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/RequestReportResponse.php');
return MarketplaceWebService_Model_RequestReportResponse::fromXML($this->invoke('RequestReport'));
}

Expand All @@ -223,7 +223,7 @@ public function requestReport($request)
*/
public function getFeedSubmissionCount($request)
{
require_once ('MarketplaceWebService/Model/GetFeedSubmissionCountResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetFeedSubmissionCountResponse.php');
return MarketplaceWebService_Model_GetFeedSubmissionCountResponse::fromXML($this->invoke('GetFeedSubmissionCount'));
}

Expand All @@ -243,7 +243,7 @@ public function getFeedSubmissionCount($request)
*/
public function cancelReportRequests($request)
{
require_once ('MarketplaceWebService/Model/CancelReportRequestsResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/CancelReportRequestsResponse.php');
return MarketplaceWebService_Model_CancelReportRequestsResponse::fromXML($this->invoke('CancelReportRequests'));
}

Expand All @@ -263,7 +263,7 @@ public function cancelReportRequests($request)
*/
public function getReportList($request)
{
require_once ('MarketplaceWebService/Model/GetReportListResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportListResponse.php');
return MarketplaceWebService_Model_GetReportListResponse::fromXML($this->invoke('GetReportList'));
}

Expand All @@ -282,7 +282,7 @@ public function getReportList($request)
*/
public function getFeedSubmissionResult($request)
{
require_once ('MarketplaceWebService/Model/GetFeedSubmissionResultResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetFeedSubmissionResultResponse.php');
return MarketplaceWebService_Model_GetFeedSubmissionResultResponse::fromXML($this->invoke('GetFeedSubmissionResult'));
}

Expand All @@ -301,7 +301,7 @@ public function getFeedSubmissionResult($request)
*/
public function getFeedSubmissionList($request)
{
require_once ('MarketplaceWebService/Model/GetFeedSubmissionListResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetFeedSubmissionListResponse.php');
return MarketplaceWebService_Model_GetFeedSubmissionListResponse::fromXML($this->invoke('GetFeedSubmissionList'));
}

Expand All @@ -320,7 +320,7 @@ public function getFeedSubmissionList($request)
*/
public function getReportRequestList($request)
{
require_once ('MarketplaceWebService/Model/GetReportRequestListResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportRequestListResponse.php');
return MarketplaceWebService_Model_GetReportRequestListResponse::fromXML($this->invoke('GetReportRequestList'));
}

Expand All @@ -339,7 +339,7 @@ public function getReportRequestList($request)
*/
public function getReportScheduleListByNextToken($request)
{
require_once ('MarketplaceWebService/Model/GetReportScheduleListByNextTokenResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportScheduleListByNextTokenResponse.php');
return MarketplaceWebService_Model_GetReportScheduleListByNextTokenResponse::fromXML($this->invoke('GetReportScheduleListByNextToken'));
}

Expand All @@ -358,7 +358,7 @@ public function getReportScheduleListByNextToken($request)
*/
public function getReportListByNextToken($request)
{
require_once ('MarketplaceWebService/Model/GetReportListByNextTokenResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportListByNextTokenResponse.php');
return MarketplaceWebService_Model_GetReportListByNextTokenResponse::fromXML($this->invoke('GetReportListByNextToken'));
}

Expand All @@ -378,7 +378,7 @@ public function getReportListByNextToken($request)
*/
public function manageReportSchedule($request)
{
require_once ('MarketplaceWebService/Model/ManageReportScheduleResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/ManageReportScheduleResponse.php');
return MarketplaceWebService_Model_ManageReportScheduleResponse::fromXML($this->invoke('ManageReportSchedule'));
}

Expand All @@ -398,7 +398,7 @@ public function manageReportSchedule($request)
*/
public function getReportRequestCount($request)
{
require_once ('MarketplaceWebService/Model/GetReportRequestCountResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportRequestCountResponse.php');
return MarketplaceWebService_Model_GetReportRequestCountResponse::fromXML($this->invoke('GetReportRequestCount'));
}

Expand All @@ -417,7 +417,7 @@ public function getReportRequestCount($request)
*/
public function getReportScheduleList($request)
{
require_once ('MarketplaceWebService/Model/GetReportScheduleListResponse.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model/GetReportScheduleListResponse.php');
return MarketplaceWebService_Model_GetReportScheduleListResponse::fromXML($this->invoke('GetReportScheduleList'));
}

Expand Down
8 changes: 4 additions & 4 deletions src/MarketplaceWebService/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private function fromDOMElement(DOMElement $dom)
if ($this->isComplexType($fieldType[0])) {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length >= 1) {
require_once (str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
foreach ($elements as $element) {
$this->fields[$fieldName]['FieldValue'][] = new $fieldType[0]($element);
}
Expand All @@ -185,7 +185,7 @@ private function fromDOMElement(DOMElement $dom)
if ($this->isComplexType($fieldType)) {
$elements = $xpath->query("./a:$fieldName", $dom);
if ($elements->length == 1) {
require_once (str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
$this->fields[$fieldName]['FieldValue'] = new $fieldType($elements->item(0));
}
} else {
Expand Down Expand Up @@ -231,7 +231,7 @@ private function fromAssociativeArray(array $array)
$elements = array($elements);
}
if (count ($elements) >= 1) {
require_once (str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType[0]) . ".php");
foreach ($elements as $element) {
$this->fields[$fieldName]['FieldValue'][] = new $fieldType[0]($element);
}
Expand All @@ -253,7 +253,7 @@ private function fromAssociativeArray(array $array)
} else {
if ($this->isComplexType($fieldType)) {
if (array_key_exists($fieldName, $array)) {
require_once (str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
require_once (dirname(__FILE__) . str_replace('_', DIRECTORY_SEPARATOR, $fieldType) . ".php");
$this->fields[$fieldName]['FieldValue'] = new $fieldType($array[$fieldName]);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
2 changes: 1 addition & 1 deletion src/MarketplaceWebService/Model/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
2 changes: 1 addition & 1 deletion src/MarketplaceWebService/Model/ErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
2 changes: 1 addition & 1 deletion src/MarketplaceWebService/Model/FeedSubmissionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @see MarketplaceWebService_Model
*/
require_once ('MarketplaceWebService/Model.php');
require_once (dirname(__FILE__) . 'MarketplaceWebService/Model.php');



Expand Down
Loading

0 comments on commit 4ba07d1

Please sign in to comment.