You are here

interface PuSHSubscriptionInterface in Feeds 8.2

Implement to provide a storage backend for subscriptions.

Variables passed in to the constructor must be accessible as public class variables.

Hierarchy

Expanded class hierarchy of PuSHSubscriptionInterface

All classes that implement PuSHSubscriptionInterface

File

lib/Drupal/feeds/PuSHSubscriber.php, line 323
Pubsubhubbub subscriber library.

Namespace

Drupal\feeds
View source
interface PuSHSubscriptionInterface {

  /**
   * @param $domain
   *   A string that defines the domain in which the subscriber_id is unique.
   * @param $subscriber_id
   *   A unique numeric subscriber id.
   * @param $hub
   *   The URL of the hub endpoint.
   * @param $topic
   *   The topic to subscribe to.
   * @param $secret
   *   A secret key used for message authentication.
   * @param $status
   *   The status of the subscription.
   *   'subscribe' - subscribing to a feed.
   *   'unsubscribe' - unsubscribing from a feed.
   *   'subscribed' - subscribed.
   *   'unsubscribed' - unsubscribed.
   *   'subscribe failed' - subscribe request failed.
   *   'unsubscribe failed' - unsubscribe request failed.
   * @param $post_fields
   *   An array of the fields posted to the hub.
   */
  public function __construct($domain, $subscriber_id, $hub, $topic, $secret, $status = '', $post_fields = '');

  /**
   * Save a subscription.
   */
  public function save();

  /**
   * Load a subscription.
   *
   * @return
   *   A PuSHSubscriptionInterface object if a subscription exist, NULL
   *   otherwise.
   */
  public static function load($domain, $subscriber_id);

  /**
   * Delete a subscription.
   */
  public function delete();

}

Members

Namesort descending Modifiers Type Description Overrides
PuSHSubscriptionInterface::delete public function Delete a subscription. 1
PuSHSubscriptionInterface::load public static function Load a subscription. 1
PuSHSubscriptionInterface::save public function Save a subscription. 1
PuSHSubscriptionInterface::__construct public function 1