| @@ 36-46 (lines=11) @@ | ||
| 33 | * @var bool $use_content_encoding Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true). |
|
| 34 | * } |
|
| 35 | */ |
|
| 36 | public function __construct(array $config = []) |
|
| 37 | { |
|
| 38 | $resolver = new OptionsResolver(); |
|
| 39 | $resolver->setDefaults([ |
|
| 40 | 'use_content_encoding' => true, |
|
| 41 | ]); |
|
| 42 | $resolver->setAllowedTypes('use_content_encoding', 'bool'); |
|
| 43 | $options = $resolver->resolve($config); |
|
| 44 | ||
| 45 | $this->useContentEncoding = $options['use_content_encoding']; |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * {@inheritdoc} |
|
| @@ 40-50 (lines=11) @@ | ||
| 37 | * @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up. |
|
| 38 | * } |
|
| 39 | */ |
|
| 40 | public function __construct(array $config = []) |
|
| 41 | { |
|
| 42 | $resolver = new OptionsResolver(); |
|
| 43 | $resolver->setDefaults([ |
|
| 44 | 'retries' => 1, |
|
| 45 | ]); |
|
| 46 | $resolver->setAllowedTypes('retries', 'int'); |
|
| 47 | $options = $resolver->resolve($config); |
|
| 48 | ||
| 49 | $this->retry = $options['retries']; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * {@inheritdoc} |
|