/** * Get HTTP adapter for your application * * @return HttpAdapter */ private function getHttpAdapter() { if ($this->httpAdapter === null) { $this->httpAdapter = HttpAdapterDiscovery::find(); } return $this->httpAdapter; }
/** * Constructor * * @param array $servers Caching proxy server hostnames or IP * addresses, including port if not port 80. * E.g. ['127.0.0.1:6081'] * @param string $baseUri Default application hostname, optionally * including base URL, for purge and refresh * requests (optional). This is required if * you purge and refresh paths instead of * absolute URLs. * @param HttpAdapter $httpAdapter If no HTTP adapter is supplied, a default * one will be created. */ public function __construct(array $servers, $baseUri = null, HttpAdapter $httpAdapter = null) { $this->httpAdapter = $httpAdapter ?: HttpAdapterDiscovery::find(); $this->initQueue($servers, $baseUri); }