3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Feed\PubSubHubbub;
12 interface CallbackInterface
15 * Handle any callback from a Hub Server responding to a subscription or
16 * unsubscription request. This should be the Hub Server confirming the
17 * the request prior to taking action on it.
19 * @param array $httpData GET/POST data if available and not in $_GET/POST
20 * @param bool $sendResponseNow Whether to send response now or when asked
22 public function handle(array $httpData = null, $sendResponseNow = false);
25 * Send the response, including all headers.
26 * If you wish to handle this via Zend\Mvc\Controller, use the getter methods
27 * to retrieve any data needed to be set on your HTTP Response object, or
28 * simply give this object the HTTP Response instance to work with for you!
32 public function sendResponse();
35 * An instance of a class handling Http Responses. This is implemented in
36 * Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with
37 * (i.e. not inherited from) Zend\Feed\Pubsubhubbub\AbstractCallback.
39 * @param HttpResponse|\Zend\Http\PhpEnvironment\Response $httpResponse
41 public function setHttpResponse($httpResponse);
44 * An instance of a class handling Http Responses. This is implemented in
45 * Zend\Feed\Pubsubhubbub\HttpResponse which shares an unenforced interface with
46 * (i.e. not inherited from) Zend\Feed\Pubsubhubbub\AbstractCallback.
48 * @return HttpResponse|\Zend\Http\PhpEnvironment\Response
50 public function getHttpResponse();