SubscriptionInterface.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 Entity
  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 Entity
  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_Model_SubscriptionInterface
  29. {
  30. /**
  31. * Save subscription to RDMBS
  32. *
  33. * @param array $data The key must be stored here as a $data['id'] entry
  34. * @return bool
  35. */
  36. public function setSubscription(array $data);
  37. /**
  38. * Get subscription by ID/key
  39. *
  40. * @param string $key
  41. * @return array
  42. */
  43. public function getSubscription($key);
  44. /**
  45. * Determine if a subscription matching the key exists
  46. *
  47. * @param string $key
  48. * @return bool
  49. */
  50. public function hasSubscription($key);
  51. /**
  52. * Delete a subscription
  53. *
  54. * @param string $key
  55. * @return bool
  56. */
  57. public function deleteSubscription($key);
  58. }