| 1 | <?php |
||
| 14 | class FactoryContainer implements FactoryContainerInterface { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Storage for factories. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $factories = array(); |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The default factory for when no type-specific factory is registered. |
||
| 25 | * |
||
| 26 | * @var \TheSportsDb\Entity\Factory\FactoryInterface |
||
| 27 | */ |
||
| 28 | protected $defaultFactory; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | 1 | public function addFactory(FactoryInterface $factory, $entityType) { |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 1 | public function getFactory($entityType) { |
|
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | 1 | public function setDefaultFactory(FactoryInterface $factory) { |
|
| 53 | |||
| 54 | } |
||
| 55 |