1 | <?php |
||
15 | abstract class AbstractFactory implements ProviderFactoryInterface |
||
16 | { |
||
17 | protected static $dependencies = []; |
||
18 | |||
19 | /** |
||
20 | * @param array $config |
||
21 | * |
||
22 | * @return Provider |
||
23 | */ |
||
24 | abstract protected function getProvider(array $config); |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function createProvider(array $options = []) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public static function validate(array $options, $providerName) |
||
63 | |||
64 | /** |
||
65 | * Make sure that we have the required class and throw and exception if we don't. |
||
66 | * |
||
67 | * @throws \LogicException |
||
68 | */ |
||
69 | protected static function verifyDependencies() |
||
83 | |||
84 | /** |
||
85 | * By default we do not have any options to configure. A factory should override this function and confgure |
||
86 | * the options resolver. |
||
87 | * |
||
88 | * @param OptionsResolver $resolver |
||
89 | */ |
||
90 | protected static function configureOptionResolver(OptionsResolver $resolver) |
||
93 | } |