| @@ 39-49 (lines=11) @@ | ||
| 36 | * @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). |
|
| 37 | * } |
|
| 38 | */ |
|
| 39 | public function __construct(array $config = []) |
|
| 40 | { |
|
| 41 | $resolver = new OptionsResolver(); |
|
| 42 | $resolver->setDefaults([ |
|
| 43 | 'use_content_encoding' => true, |
|
| 44 | ]); |
|
| 45 | $resolver->setAllowedTypes('use_content_encoding', 'bool'); |
|
| 46 | $options = $resolver->resolve($config); |
|
| 47 | ||
| 48 | $this->useContentEncoding = $options['use_content_encoding']; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * {@inheritdoc} |
|
| @@ 37-47 (lines=11) @@ | ||
| 34 | * @var bool only_server_exception Whether this plugin should only throw 5XX Exceptions (default to false). |
|
| 35 | * } |
|
| 36 | */ |
|
| 37 | public function __construct(array $config = []) |
|
| 38 | { |
|
| 39 | $resolver = new OptionsResolver(); |
|
| 40 | $resolver->setDefaults([ |
|
| 41 | 'only_server_exception' => false, |
|
| 42 | ]); |
|
| 43 | $resolver->setAllowedTypes('only_server_exception', 'bool'); |
|
| 44 | $options = $resolver->resolve($config); |
|
| 45 | ||
| 46 | $this->onlyServerException = $options['only_server_exception']; |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * {@inheritdoc} |
|