1 | <?php |
||
25 | abstract class AbstractFactory implements ProviderFactoryInterface |
||
26 | { |
||
27 | protected static $dependencies = []; |
||
28 | |||
29 | /** |
||
30 | * @param array $config |
||
31 | * |
||
32 | * @return Provider |
||
33 | */ |
||
34 | abstract protected function getProvider(array $config): Provider; |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 22 | public function createProvider(array $options = []): Provider |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 22 | public static function validate(array $options, $providerName) |
|
73 | |||
74 | /** |
||
75 | * Make sure that we have the required class and throw and exception if we don't. |
||
76 | * |
||
77 | * @throws \LogicException |
||
78 | */ |
||
79 | 22 | protected static function verifyDependencies() |
|
93 | |||
94 | /** |
||
95 | * By default we do not have any options to configure. A factory should override this function and confgure |
||
96 | * the options resolver. |
||
97 | * |
||
98 | * @param OptionsResolver $resolver |
||
99 | */ |
||
100 | 1 | protected static function configureOptionResolver(OptionsResolver $resolver) |
|
103 | } |
||
104 |