for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Abstract Response
*/
namespace Bobbyshaw\WatsonVisualRecognition\Message;
*
* This abstract class implements ResponseInterface and defines a basic
* set of functions that all Watson Requests are intended to include.
* Objects of this class or a subclass are usually created in the Request
* object (subclass of AbstractRequest) as the return parameters from the
* send() function.
abstract class AbstractResponse implements ResponseInterface
{
* The embodied request object.
* @var RequestInterface
protected $request;
* The data contained in the response.
* @var mixed
protected $data;
* Constructor
* @param RequestInterface $request the initiating request.
* @param mixed $data
public function __construct(RequestInterface $request, $data)
$this->request = $request;
$this->data = $data;
}
* Get the initiating request object.
* @return RequestInterface
public function getRequest()
return $this->request;
* Get the response data.
* @return mixed
public function getData()
return $this->data;