CallbackInterface.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Feed_Pubsubhubbub
  17. * @subpackage Callback
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @category Zend
  24. * @package Zend_Feed_Pubsubhubbub
  25. * @subpackage Callback
  26. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  27. * @license http://framework.zend.com/license/new-bsd New BSD License
  28. */
  29. interface Zend_Feed_Pubsubhubbub_CallbackInterface
  30. {
  31. /**
  32. * Handle any callback from a Hub Server responding to a subscription or
  33. * unsubscription request. This should be the Hub Server confirming the
  34. * the request prior to taking action on it.
  35. *
  36. * @param array $httpData GET/POST data if available and not in $_GET/POST
  37. * @param bool $sendResponseNow Whether to send response now or when asked
  38. */
  39. public function handle(array $httpData = null, $sendResponseNow = false);
  40. /**
  41. * Send the response, including all headers.
  42. * If you wish to handle this via Zend_Controller, use the getter methods
  43. * to retrieve any data needed to be set on your HTTP Response object, or
  44. * simply give this object the HTTP Response instance to work with for you!
  45. *
  46. * @return void
  47. */
  48. public function sendResponse();
  49. /**
  50. * An instance of a class handling Http Responses. This is implemented in
  51. * Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with
  52. * (i.e. not inherited from) Zend_Controller_Response_Http.
  53. *
  54. * @param Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http $httpResponse
  55. */
  56. public function setHttpResponse($httpResponse);
  57. /**
  58. * An instance of a class handling Http Responses. This is implemented in
  59. * Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with
  60. * (i.e. not inherited from) Zend_Controller_Response_Http.
  61. *
  62. * @return Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http
  63. */
  64. public function getHttpResponse();
  65. }