1 | <?php |
||
17 | abstract class AbstractFactory implements FactoryInterface |
||
18 | { |
||
19 | // phpcs:enable SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming |
||
20 | /** |
||
21 | * Would normally be set to orm | odm |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $mappingType; |
||
26 | |||
27 | /** @var string */ |
||
28 | protected $name; |
||
29 | |||
30 | /** @var AbstractOptions */ |
||
31 | protected $options; |
||
32 | |||
33 | 13 | public function __construct(string $name) |
|
37 | |||
38 | 13 | public function getName() : string |
|
42 | |||
43 | /** |
||
44 | * Would normally be set to orm | odm |
||
45 | */ |
||
46 | 13 | public function getMappingType() : string |
|
50 | |||
51 | /** |
||
52 | * Gets options from configuration based on name. |
||
53 | * |
||
54 | * @throws RuntimeException |
||
55 | */ |
||
56 | 13 | public function getOptions(ContainerInterface $container, string $key, ?string $name = null) : AbstractOptions |
|
85 | |||
86 | /** |
||
87 | * Get the class name of the options associated with this factory. |
||
88 | * |
||
89 | * @abstract |
||
90 | */ |
||
91 | abstract public function getOptionsClass() : string; |
||
92 | } |
||
93 |