/**
  * Initializes provided context.
  *
  * @param Context $context
  */
 public function initializeContext(Context $context)
 {
     if ($context instanceof ApiClientAwareInterface) {
         $context->setClient($this->client);
         $context->setConfig($this->config);
     }
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function initializeContext(Context $context)
 {
     if (!$context instanceof ApiContextInterface) {
         return;
     }
     $context->setClient($this->client);
     $context->setRequestFactory($this->messageFactory);
     $context->setBaseUrl($this->baseUrl);
 }
 /**
  * {@inheritdocs}
  */
 public function initializeContext(Context $context)
 {
     // All contexts are passed here, only DrupalAwareInterface is allowed.
     if (!$context instanceof EloquaAwareInterface) {
         return;
     }
     // Set ELoqua client.
     $context->setClient($this->client);
     // Set event dispatcher.
     $context->setDispatcher($this->dispatcher);
     // Add all parameters to the context.
     $context->setEloquaParameters($this->parameters);
 }
 /**
  * Initializes provided context.
  *
  * @param Context $context
  */
 public function initializeContext(Context $context)
 {
     if ($context instanceof MailcatcherClientAwareInterface) {
         $context->setClient($this->client);
     }
 }
 /**
  * Initializes provided context.
  *
  * @param Context $context
  */
 public function initializeContext(Context $context)
 {
     $context->setClient($this->client);
 }