public function buildProxyClient(array $servers, $baseUrl)
    {
        $allServers = array();
        foreach ($servers as $server) {
            if (!$this->dynamicSettingParser->isDynamicSetting($server)) {
                $allServers[] = $server;
                continue;
            }

            $settings = $this->dynamicSettingParser->parseDynamicSetting($server);
            $configuredServers = $this->configResolver->getParameter(
                $settings['param'],
                $settings['namespace'],
                $settings['scope']
            );
            $allServers = array_merge($allServers, (array)$configuredServers);
        }

        $class = $this->proxyClientClass;

        return new $class($allServers, $baseUrl);
    }
public function buildProxyClient(array $servers, $baseUrl)
    {
        $allServers = array();
        foreach ($servers as $server) {
            if (!$this->dynamicSettingParser->isDynamicSetting($server)) {
                $allServers[] = $server;
                continue;
            }

            $settings = $this->dynamicSettingParser->parseDynamicSetting($server);
            $configuredServers = $this->configResolver->getParameter(
                $settings['param'],
                $settings['namespace'],
                $settings['scope']
            );
            $allServers = array_merge($allServers, (array)$configuredServers);
        }

        $class = $this->proxyClientClass;

        return new $class($allServers, $baseUrl);
    }
public function buildProxyClient ( array $ servers , $ baseUrl ) { $ allServers = array ( ) ; foreach ( $ servers as $ server ) { if ( ! $ this -> dynamicSettingParser -> isDynamicSetting ( $ server ) ) { $ allServers [ ] = $ server ; continue ; } $ settings = $ this -> dynamicSettingParser -> parseDynamicSetting ( $ server ) ; $ configuredServers = $ this -> configResolver -> getParameter ( $ settings [ 'param' ] , $ settings [ 'namespace' ] , $ settings [ 'scope' ] ) ; $ allServers = array_merge ( $ allServers , ( array ) $ configuredServers ) ; } $ class = $ this -> proxyClientClass ; return new $ class ( $ allServers , $ baseUrl ) ; }
Builds the proxy client, taking dynamically defined servers into account.

@param array $servers
@param string $baseUrl

@return \FOS\HttpCache\ProxyClient\Varnish
Builds the proxy client taking dynamically defined servers into account .