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 | 'includeSource' => true, |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * ResponsiveFactoryConfigurator constructor. |
||
41 | * |
||
42 | * @param array $config |
||
43 | * |
||
44 | * @throws InvalidConfigurationException |
||
45 | */ |
||
46 | public function __construct(array $config = []) { |
||
53 | |||
54 | /** |
||
55 | * @param ResponsiveFactory $factory |
||
56 | * |
||
57 | * @return void |
||
58 | */ |
||
59 | public function configure(ResponsiveFactory $factory) { |
||
85 | |||
86 | /** |
||
87 | * @param Scaler $scaler |
||
88 | * |
||
89 | * @return Scaler |
||
90 | */ |
||
91 | public function configureScaler(Scaler $scaler) { |
||
102 | |||
103 | /** |
||
104 | * @return array |
||
105 | */ |
||
106 | public function getConfig() { |
||
109 | |||
110 | /** |
||
111 | * @param $key |
||
112 | * |
||
113 | * @return mixed|null |
||
114 | */ |
||
115 | public function get($key) { |
||
118 | } |
||
119 |