| 1 | <?php |
||
| 8 | class EntityFactory implements EntityFactoryInterface |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $entityClass; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $collectionClass; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $entityClass |
||
| 23 | * @param string $collectionClass |
||
| 24 | */ |
||
| 25 | public function __construct($entityClass, $collectionClass = Collection::class) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param array $data |
||
| 33 | * |
||
| 34 | * @return EntityInterface |
||
| 35 | */ |
||
| 36 | public function create(array $data) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param array $data |
||
| 55 | * |
||
| 56 | * @return ArrayObject |
||
| 57 | */ |
||
| 58 | public function createCollection(array $data) |
||
| 69 | } |
||
| 70 |