CallbackInterface.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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-2009 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. /**
  22. * @category Zend
  23. * @package Zend_Feed_Pubsubhubbub
  24. * @subpackage Callback
  25. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  26. * @license http://framework.zend.com/license/new-bsd New BSD License
  27. */
  28. interface Zend_Feed_Pubsubhubbub_CallbackInterface
  29. {
  30. /**
  31. * Handle any callback from a Hub Server responding to a subscription or
  32. * unsubscription request. This should be the Hub Server confirming the
  33. * the request prior to taking action on it.
  34. *
  35. * @param array $httpData GET/POST data if available and not in $_GET/POST
  36. * @param bool $sendResponseNow Whether to send response now or when asked
  37. */
  38. public function handle(array $httpData = null, $sendResponseNow = false);
  39. /**
  40. * Send the response, including all headers.
  41. * If you wish to handle this via Zend_Controller, use the getter methods
  42. * to retrieve any data needed to be set on your HTTP Response object, or
  43. * simply give this object the HTTP Response instance to work with for you!
  44. *
  45. * @return void
  46. */
  47. public function sendResponse();
  48. /**
  49. * An instance of a class handling Http Responses. This is implemented in
  50. * Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with
  51. * (i.e. not inherited from) Zend_Controller_Response_Http.
  52. *
  53. * @param Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http $httpResponse
  54. */
  55. public function setHttpResponse($httpResponse);
  56. /**
  57. * An instance of a class handling Http Responses. This is implemented in
  58. * Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with
  59. * (i.e. not inherited from) Zend_Controller_Response_Http.
  60. *
  61. * @return Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http
  62. */
  63. public function getHttpResponse();
  64. }