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