class PuSHSubscription

  1. cis7 sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc PuSHSubscription
  2. cle7 sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc PuSHSubscription
  3. elmsmedia7 sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc PuSHSubscription
  4. icor7 sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc PuSHSubscription
  5. meedjum_blog7 sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc PuSHSubscription
  6. mooc7 sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc PuSHSubscription

Implement a PuSHSubscriptionInterface.

Hierarchy

Expanded class hierarchy of PuSHSubscription

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
PuSHSubscription::$domain public property
PuSHSubscription::$hub public property
PuSHSubscription::$post_fields public property
PuSHSubscription::$secret public property
PuSHSubscription::$status public property
PuSHSubscription::$subscriber_id public property
PuSHSubscription::$timestamp public property
PuSHSubscription::$topic public property
PuSHSubscription::delete public function Delete a subscription. Overrides PuSHSubscriptionInterface::delete
PuSHSubscription::load public static function Load a subscription. Overrides PuSHSubscriptionInterface::load
PuSHSubscription::save public function Save a subscription. Overrides PuSHSubscriptionInterface::save
PuSHSubscription::__construct public function Create a subscription. Overrides PuSHSubscriptionInterface::__construct

File

sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc, line 239
Home of the FeedsHTTPFetcher and related classes.

View source
class PuSHSubscription implements PuSHSubscriptionInterface {
  public $domain;
  public $subscriber_id;
  public $hub;
  public $topic;
  public $status;
  public $secret;
  public $post_fields;
  public $timestamp;

  /**
   * Load a subscription.
   */
  public static function load($domain, $subscriber_id) {
    if ($v = db_query("SELECT * FROM {feeds_push_subscriptions} WHERE domain = :domain AND subscriber_id = :sid", array(':domain' => $domain, ':sid' => $subscriber_id))->fetchAssoc()) {
      $v['post_fields'] = unserialize($v['post_fields']);
      return new PuSHSubscription($v['domain'], $v['subscriber_id'], $v['hub'], $v['topic'], $v['secret'], $v['status'], $v['post_fields'], $v['timestamp']);
    }
  }

  /**
   * Create a subscription.
   */
  public function __construct($domain, $subscriber_id, $hub, $topic, $secret, $status = '', $post_fields = '') {
    $this->domain = $domain;
    $this->subscriber_id = $subscriber_id;
    $this->hub = $hub;
    $this->topic = $topic;
    $this->status = $status;
    $this->secret = $secret;
    $this->post_fields = $post_fields;
  }

  /**
   * Save a subscription.
   */
  public function save() {
    $this->timestamp = time();
    $this->delete($this->domain, $this->subscriber_id);
    drupal_write_record('feeds_push_subscriptions', $this);
  }

  /**
   * Delete a subscription.
   */
  public function delete() {
    db_delete('feeds_push_subscriptions')->condition('domain', $this->domain)->condition('subscriber_id', $this->subscriber_id)->execute();
  }
}
1 string reference to 'PuSHSubscription'
FeedsHTTPFetcher::subscriber in sites/all/modules/ulmus/feeds/plugins/FeedsHTTPFetcher.inc
Convenience method for instantiating a subscriber object.
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.