public function BrightcoveProxyInitSubscriber::initializeBrightcoveClientProxy in Brightcove Video Connect 8
Same name and namespace in other branches
- 8.2 modules/brightcove_proxy/src/EventSubscriber/BrightcoveProxyInitSubscriber.php \Drupal\brightcove_proxy\EventSubscriber\BrightcoveProxyInitSubscriber::initializeBrightcoveClientProxy()
- 3.x modules/brightcove_proxy/src/EventSubscriber/BrightcoveProxyInitSubscriber.php \Drupal\brightcove_proxy\EventSubscriber\BrightcoveProxyInitSubscriber::initializeBrightcoveClientProxy()
Initialize Brightcove client proxy.
Parameters
\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: GET response event.
File
- modules/
brightcove_proxy/ src/ EventSubscriber/ BrightcoveProxyInitSubscriber.php, line 39
Class
- BrightcoveProxyInitSubscriber
- Subscribes to Drupal initialization event.
Namespace
Drupal\brightcove_proxy\EventSubscriberCode
public function initializeBrightcoveClientProxy(GetResponseEvent $event) {
// Initialize proxy config for Brightcove client if enabled.
if ($this->config
->get('use_proxy')) {
Client::$proxyUserPassword = "{$this->config->get('proxy_username')}:{$this->config->get('proxy_password')}";
Client::$httpProxyTunnel = $this->config
->get('http_proxy_tunnel');
Client::$proxyAuth = $this->config
->get('proxy_auth');
Client::$proxyPort = $this->config
->get('proxy_port');
Client::$proxyType = $this->config
->get('proxy_type');
Client::$proxy = $this->config
->get('proxy');
}
}