You are here

public function PuSHSubscriber::handleRequest in Feeds 7

Same name and namespace in other branches
  1. 6 libraries/PuSHSubscriber.inc \PuSHSubscriber::handleRequest()
  2. 7.2 libraries/PuSHSubscriber.inc \PuSHSubscriber::handleRequest()

Request handler for subscription callbacks.

File

libraries/PuSHSubscriber.inc, line 120
Pubsubhubbub subscriber library.

Class

PuSHSubscriber
PubSubHubbub subscriber.

Code

public function handleRequest($callback) {
  if (isset($_GET['hub_challenge'])) {
    $this
      ->verifyRequest();
  }
  else {
    if ($raw = $this
      ->receive()) {
      $callback($raw, $this->domain, $this->subscriber_id);
    }
  }
}