public static function PuSHSubscriber::instance in Feeds 7.2
Same name and namespace in other branches
- 6 libraries/PuSHSubscriber.inc \PuSHSubscriber::instance()
- 7 libraries/PuSHSubscriber.inc \PuSHSubscriber::instance()
Singleton.
PuSHSubscriber identifies a unique subscription by a domain and a numeric id. The numeric id is assumed to e unique in its domain.
Parameters
$domain: A string that identifies the domain in which $subscriber_id is unique.
$subscriber_id: A numeric subscriber id.
$subscription_class: The class to use for handling subscriptions. Class MUST implement PuSHSubscriberSubscriptionInterface
PuSHSubscriberEnvironmentInterface $env: Environmental object for messaging and logging.
File
- libraries/
PuSHSubscriber.inc, line 39 - Pubsubhubbub subscriber library.
Class
- PuSHSubscriber
- PubSubHubbub subscriber.
Code
public static function instance($domain, $subscriber_id, $subscription_class, PuSHSubscriberEnvironmentInterface $env) {
static $subscribers;
if (!isset($subscriber[$domain][$subscriber_id])) {
$subscriber = new PuSHSubscriber($domain, $subscriber_id, $subscription_class, $env);
}
return $subscriber;
}