Exemplo n.º 1
0
 private function commitOffset()
 {
     if ($this->hasCommits) {
         $this->metadata->commitOffset($this->groupId, $this->topic, $this->brokerId, $this->partition, $this->consumer->getWatermark());
         $this->hasCommits = false;
     }
     $this->lastCommitOffset = time();
 }
 public static function createRequestToken(IConsumer $consumer, $token, $tokensecret, $callback)
 {
     $pdo = Db::singleton();
     $pdo->exec("insert into oauth_token (type,consumer_id,token,token_secret,callback_url) values (1," . $consumer->getId() . ",'" . $token . "','" . $tokensecret . "','" . $callback . "') ");
 }