1<?php 2/** 3 * Zend Framework (http://framework.zend.com/) 4 * 5 * @link http://github.com/zendframework/zf2 for the canonical source repository 6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 7 * @license http://framework.zend.com/license/new-bsd New BSD License 8 */ 9 10namespace Zend\Feed\PubSubHubbub\Model; 11 12interface SubscriptionPersistenceInterface 13{ 14 /** 15 * Save subscription to RDMBS 16 * 17 * @param array $data The key must be stored here as a $data['id'] entry 18 * @return bool 19 */ 20 public function setSubscription(array $data); 21 22 /** 23 * Get subscription by ID/key 24 * 25 * @param string $key 26 * @return array 27 */ 28 public function getSubscription($key); 29 30 /** 31 * Determine if a subscription matching the key exists 32 * 33 * @param string $key 34 * @return bool 35 */ 36 public function hasSubscription($key); 37 38 /** 39 * Delete a subscription 40 * 41 * @param string $key 42 * @return bool 43 */ 44 public function deleteSubscription($key); 45} 46