Esempio n. 1
0
 /**
  * {@inheritDoc}
  *
  * When creating the client, you can configure options:
  *
  * - purge_method:         HTTP method that identifies purge requests.
  *
  * @param array $options The purge_method that should be used.
  */
 public function __construct(array $servers, $baseUrl = null, HttpAdapter $httpAdapter = null, $options = [])
 {
     parent::__construct($servers, $baseUrl, $httpAdapter);
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['purge_method' => PurgeSubscriber::DEFAULT_PURGE_METHOD]);
     $this->options = $resolver->resolve($options);
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  *
  * When creating the client, you can configure options:
  *
  * - purge_method:         HTTP method that identifies purge requests.
  *
  * @param array $options The purge_method that should be used.
  */
 public function __construct(array $servers, $baseUrl = null, ClientInterface $client = null, array $options = array())
 {
     parent::__construct($servers, $baseUrl, $client);
     $resolver = new OptionsResolver();
     $resolver->setDefaults(array('purge_method' => PurgeSubscriber::DEFAULT_PURGE_METHOD));
     $this->options = $resolver->resolve($options);
 }
Esempio n. 3
0
File: Nginx.php Progetto: ataxel/tp
 /**
  * {@inheritdoc}
  *
  * @param array           $servers       Caching proxy server hostnames or IP addresses,
  *                                       including port if not port 80.
  *                                       E.g. array('127.0.0.1:6081')
  * @param string          $baseUrl       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 string          $purgeLocation Path that triggers purge (optional).
  * @param ClientInterface $client        HTTP client (optional). If no HTTP client
  *                                       is supplied, a default one will be
  *                                       created.
  */
 public function __construct(
     array $servers,
     $baseUrl = null,
     $purgeLocation = '',
     ClientInterface $client = null
 ) {
     $this->purgeLocation = (string) $purgeLocation;
     parent::__construct($servers, $baseUrl, $client);
 }
Esempio n. 4
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $servers, $baseUri = null, HttpAdapter $httpAdapter = null)
 {
     parent::__construct($servers, $baseUri, $httpAdapter);
     $this->baseUriSet = $baseUri !== null;
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $servers, $baseUri = null, HttpAdapter $httpAdapter = null, $tagsHeader = 'X-Cache-Tags')
 {
     parent::__construct($servers, $baseUri, $httpAdapter);
     $this->baseUriSet = $baseUri !== null;
     $this->tagsHeader = $tagsHeader;
 }