You are here

public function AbstractCallback::setHttpResponse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/PubSubHubbub/AbstractCallback.php \Zend\Feed\PubSubHubbub\AbstractCallback::setHttpResponse()

An instance of a class handling Http Responses. This is implemented in Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with (i.e. not inherited from) Zend\Controller\Response\Http.

Parameters

HttpResponse|PhpResponse $httpResponse:

Return value

AbstractCallback

Throws

Exception\InvalidArgumentException

Overrides CallbackInterface::setHttpResponse

File

vendor/zendframework/zend-feed/src/PubSubHubbub/AbstractCallback.php, line 138

Class

AbstractCallback

Namespace

Zend\Feed\PubSubHubbub

Code

public function setHttpResponse($httpResponse) {
  if (!$httpResponse instanceof HttpResponse && !$httpResponse instanceof PhpResponse) {
    throw new Exception\InvalidArgumentException('HTTP Response object must' . ' implement one of Zend\\Feed\\Pubsubhubbub\\HttpResponse or' . ' Zend\\Http\\PhpEnvironment\\Response');
  }
  $this->httpResponse = $httpResponse;
  return $this;
}