1 | <?php |
||
13 | class DefaultConfigurator implements ResponsiveFactoryConfigurator |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * The default config |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $config = [ |
||
22 | 'driver' => 'gd', |
||
23 | 'publicPath' => './', |
||
24 | 'sourcePath' => './', |
||
25 | 'rebase' => false, |
||
26 | 'enableCache' => false, |
||
27 | 'optimize' => false, |
||
28 | 'scaler' => 'filesize', |
||
29 | 'stepModifier' => 0.5, |
||
30 | 'minFileSize' => 5000, |
||
31 | 'maxFileSize' => null, |
||
32 | 'minWidth' => 300, |
||
33 | 'maxWidth' => null, |
||
34 | 'sizes' => [], |
||
35 | 'optimizerOptions' => [], |
||
36 | ]; |
||
37 | |||
38 | /** |
||
39 | * ResponsiveFactoryConfigurator constructor. |
||
40 | * |
||
41 | * @param array $config |
||
42 | * |
||
43 | * @throws InvalidConfigurationException |
||
44 | */ |
||
45 | public function __construct(array $config = []) { |
||
52 | |||
53 | /** |
||
54 | * @param ResponsiveFactory $factory |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | public function configure(ResponsiveFactory $factory) { |
||
84 | |||
85 | /** |
||
86 | * @param Scaler $scaler |
||
87 | * |
||
88 | * @return Scaler |
||
89 | */ |
||
90 | public function configureScaler(Scaler $scaler) { |
||
100 | |||
101 | /** |
||
102 | * @return array |
||
103 | */ |
||
104 | public function getConfig() { |
||
107 | |||
108 | /** |
||
109 | * @param $key |
||
110 | * |
||
111 | * @return mixed|null |
||
112 | */ |
||
113 | public function get($key) { |
||
116 | } |
||
117 |