SubscriptionInterface.php 1.7 KB

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