Пример #1
0
 protected function subscribeAtPubnub()
 {
     if (!$this->isSubscribed()) {
         return $this;
     }
     $this->pubnub = $this->context->getPubnub(array('publish_key' => 'foo', 'subscribe_key' => $this->subscription['deliveryMode']['subscriberKey']));
     //print 'PUBNUB object created' . PHP_EOL;
     $this->pubnub->subscribe($this->subscription['deliveryMode']['address'], array($this, 'notify'));
     //print 'PUBNUB subscription created' . PHP_EOL;
     return $this;
 }
Пример #2
0
 /**
  * @param string $url
  * @param array  $queryParameters
  * @param array  $body
  * @param array  $headers
  * @return Response
  * @throws HttpException
  */
 public function delete($url = '', $queryParameters = array(), $body = null, array $headers = array())
 {
     return $this->apiCall($this->context->getRequest(Request::DELETE, $url, $queryParameters, $body, $headers));
 }