1 | <?php |
||
8 | class Configuration |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | protected static $imgixFluidOptionsTypeMap = [ |
||
14 | 'fluidClass' => TypeUtils::TYPE_STRING, |
||
15 | 'updateOnResize' => TypeUtils::TYPE_BOOLEAN, |
||
16 | 'updateOnResizeDown' => TypeUtils::TYPE_BOOLEAN, |
||
17 | 'updateOnPinchZoom' => TypeUtils::TYPE_BOOLEAN, |
||
18 | 'highDPRAutoScaleQuality' => TypeUtils::TYPE_BOOLEAN, |
||
19 | 'autoInsertCSSBestPractices' => TypeUtils::TYPE_BOOLEAN, |
||
20 | 'fitImgTagToContainerWidth' => TypeUtils::TYPE_BOOLEAN, |
||
21 | 'fitImgTagToContainerHeight' => TypeUtils::TYPE_BOOLEAN, |
||
22 | 'pixelStep' => TypeUtils::TYPE_INTEGER, |
||
23 | 'ignoreDPR' => TypeUtils::TYPE_BOOLEAN, |
||
24 | 'debounce' => TypeUtils::TYPE_INTEGER, |
||
25 | 'lazyLoad' => TypeUtils::TYPE_BOOLEAN, |
||
26 | 'lazyLoadOffsetVertical' => TypeUtils::TYPE_INTEGER, |
||
27 | 'lazyLoadOffsetHorizontal' => TypeUtils::TYPE_INTEGER, |
||
28 | 'throttle' => TypeUtils::TYPE_INTEGER, |
||
29 | 'maxWidth' => TypeUtils::TYPE_INTEGER, |
||
30 | 'maxHeight' => TypeUtils::TYPE_INTEGER, |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $configuration = array(); |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private $settings; |
||
42 | |||
43 | /** |
||
44 | * @param ConfigurationManagerInterface $configurationManager |
||
45 | */ |
||
46 | 12 | public function __construct(ConfigurationManagerInterface $configurationManager) |
|
54 | |||
55 | /** |
||
56 | * @return bool |
||
57 | */ |
||
58 | 2 | public function isEnabled() |
|
65 | |||
66 | /** |
||
67 | * @return bool |
||
68 | */ |
||
69 | 2 | public function isFluidEnabled() |
|
76 | |||
77 | /** |
||
78 | * @return bool |
||
79 | */ |
||
80 | 2 | public function isObservationEnabled() |
|
87 | |||
88 | /** |
||
89 | * @return bool |
||
90 | */ |
||
91 | 2 | public function getHost() |
|
98 | |||
99 | /** |
||
100 | * @return array |
||
101 | */ |
||
102 | 2 | public function getImgixFluidOptions() |
|
111 | |||
112 | /** |
||
113 | * @return array |
||
114 | */ |
||
115 | 2 | public function getImgixDefaultUrlParameters() |
|
123 | } |
||
124 |