1 | <?php |
||
5 | trait CollectionBuilderTrait |
||
6 | { |
||
7 | /** |
||
8 | * Build a collection of entities from an indexed array of data. |
||
9 | * |
||
10 | * @param array $data |
||
11 | * @param string|null $entityType |
||
12 | * |
||
13 | * @return \Percy\Entity\Collection |
||
14 | */ |
||
15 | 4 | public function buildCollection(array $data, $entityType = null) |
|
30 | |||
31 | /** |
||
32 | * Get the primary entity type associated with the repository. |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | abstract public function getEntityType(); |
||
37 | } |
||
38 |