1 | <?php |
||
12 | class DefaultConfigurator implements ResponsiveFactoryConfigurator |
||
13 | { |
||
14 | /** |
||
15 | * The default config |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $config = [ |
||
20 | 'driver' => 'gd', |
||
21 | 'publicPath' => './', |
||
22 | 'sourcePath' => './', |
||
23 | 'enableCache' => false, |
||
24 | 'stepModifier' => 0.5, |
||
25 | 'minFileSize' => 10000, |
||
26 | 'minWidth' => 150, |
||
27 | 'scaler' => 'filesize', |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * ResponsiveFactoryConfigurator constructor. |
||
32 | * |
||
33 | * @param array $config |
||
34 | * |
||
35 | * @throws InvalidConfigurationException |
||
36 | */ |
||
37 | public function __construct(array $config = []) { |
||
44 | |||
45 | /** |
||
46 | * @param ResponsiveFactory $factory |
||
47 | * |
||
48 | * @return void |
||
49 | */ |
||
50 | public function configure(ResponsiveFactory $factory) { |
||
69 | |||
70 | /** |
||
71 | * @param Scaler $scaler |
||
72 | * |
||
73 | * @return Scaler |
||
74 | */ |
||
75 | public function configureScaler(Scaler $scaler) { |
||
85 | |||
86 | /** |
||
87 | * @return array |
||
88 | */ |
||
89 | public function getConfig() { |
||
92 | |||
93 | /** |
||
94 | * @param $key |
||
95 | * |
||
96 | * @return mixed|null |
||
97 | */ |
||
98 | public function get($key) { |
||
101 | } |
||
102 |