You are here

public static function PuSHSubscription::load in Feeds 6

Same name and namespace in other branches
  1. 7.2 plugins/FeedsHTTPFetcher.inc \PuSHSubscription::load()
  2. 7 plugins/FeedsHTTPFetcher.inc \PuSHSubscription::load()

Load a subscription.

Overrides PuSHSubscriptionInterface::load

File

plugins/FeedsHTTPFetcher.inc, line 233

Class

PuSHSubscription
Implement a PuSHSubscriptionInterface.

Code

public static function load($domain, $subscriber_id) {
  if ($v = db_fetch_array(db_query("SELECT * FROM {feeds_push_subscriptions} WHERE domain = '%s' AND subscriber_id = %d", $domain, $subscriber_id))) {
    $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']);
  }
}