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