diff --git a/src/ApiRequest.php b/src/ApiRequest.php index e72c355..c6bbc18 100644 --- a/src/ApiRequest.php +++ b/src/ApiRequest.php @@ -28,7 +28,7 @@ public function get() { if($this->_promise) { - $this->_response = $this->getApi()->processPreparedRequest($this->_promise); + $this->_response = $this->getApi()->processPreparedRequest($this->_promise, $this); } else { diff --git a/src/Interfaces/ApiInterface.php b/src/Interfaces/ApiInterface.php index 5c581b3..c2fa68b 100644 --- a/src/Interfaces/ApiInterface.php +++ b/src/Interfaces/ApiInterface.php @@ -27,11 +27,13 @@ public function processRequest(ApiRequestInterface $request); public function prepareRequest(ApiRequestInterface $request); /** - * @param PromiseInterface $apiRequest + * @param PromiseInterface $apiRequest + * + * @param ApiRequestInterface|null $rawRequest * * @return \Packaged\Api\Interfaces\ApiResponseInterface */ - public function processPreparedRequest(PromiseInterface $apiRequest); + public function processPreparedRequest(PromiseInterface $apiRequest, ApiRequestInterface $rawRequest = null); /** * Bind this API to an instance