Exemplo n.º 1
0
 /**
  * @param $service
  * @return ServiceInterface
  */
 public function getService($service)
 {
     //Lazy authentication
     $token = $this->authenticationService->getAccessToken();
     if (!$token->getAccessToken()) {
         $this->authenticationService->authorize();
     }
     $this->client->createClient($this->authenticationService->getConsumerId(), $token->getAccessToken());
     return $this->services->get($service);
 }
Exemplo n.º 2
0
 public function delete(IdentifiableInterface $entity, array $options = [])
 {
     return $this->client->delete($this->getBaseUrl() . '/' . $entity->getId(), $entity, $options);
 }