| @@ 106-119 (lines=14) @@ | ||
| 103 | * |
|
| 104 | * @return LiteSpeed |
|
| 105 | */ |
|
| 106 | protected function getProxyClient() |
|
| 107 | { |
|
| 108 | if (null === $this->proxyClient) { |
|
| 109 | $httpDispatcher = new HttpDispatcher( |
|
| 110 | ['http://'.$this->getHostName().':'.$this->getCachingProxyPort()] |
|
| 111 | ); |
|
| 112 | ||
| 113 | $this->proxyClient = new LiteSpeed($httpDispatcher, [ |
|
| 114 | 'document_root' => realpath(__DIR__ . '/../../tests/Functional/Fixtures/web'), |
|
| 115 | ]); |
|
| 116 | } |
|
| 117 | ||
| 118 | return $this->proxyClient; |
|
| 119 | } |
|
| 120 | } |
|
| 121 | ||
| @@ 162-176 (lines=15) @@ | ||
| 159 | * |
|
| 160 | * @return Nginx |
|
| 161 | */ |
|
| 162 | protected function getProxyClient($purgeLocation = '') |
|
| 163 | { |
|
| 164 | if (null === $this->proxyClient) { |
|
| 165 | $httpDispatcher = new HttpDispatcher( |
|
| 166 | ['http://127.0.0.1:'.$this->getCachingProxyPort()], |
|
| 167 | $this->getHostName().':'.$this->getCachingProxyPort() |
|
| 168 | ); |
|
| 169 | ||
| 170 | $this->proxyClient = new Nginx($httpDispatcher, [ |
|
| 171 | 'purge_location' => $purgeLocation, |
|
| 172 | ]); |
|
| 173 | } |
|
| 174 | ||
| 175 | return $this->proxyClient; |
|
| 176 | } |
|
| 177 | } |
|
| 178 | ||