1 | <?php |
||
14 | final class CollectionPersister |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $association; |
||
20 | /** |
||
21 | * @var ApiMetadata |
||
22 | */ |
||
23 | private $metadata; |
||
24 | /** |
||
25 | * @var Selectable |
||
26 | */ |
||
27 | private $matcher; |
||
28 | /** |
||
29 | * @var ApiEntityManager |
||
30 | */ |
||
31 | private $manager; |
||
32 | |||
33 | /** |
||
34 | * CollectionPersister constructor. |
||
35 | * |
||
36 | * @param ApiEntityManager $manager |
||
37 | * @param ApiMetadata $metadata |
||
38 | * @param Selectable $matcher |
||
39 | * @param array $association |
||
40 | * |
||
41 | * @internal param CrudsApiInterface $api |
||
42 | */ |
||
43 | 1 | public function __construct( |
|
54 | |||
55 | /** |
||
56 | * Returns many to many collection for given identifiers. |
||
57 | * |
||
58 | * If every identifier is present in identifier map then initialized ArrayCollection is returned immediately |
||
59 | * |
||
60 | * @param array $identifiers |
||
61 | * |
||
62 | * @return Collection |
||
63 | */ |
||
64 | 1 | public function getManyToManyCollection(array $identifiers) |
|
78 | |||
79 | /** |
||
80 | * @param array $identifiers |
||
81 | * @param $collection |
||
82 | * |
||
83 | * @return LazyCriteriaCollection |
||
84 | */ |
||
85 | 1 | private function createLazyCriteria(array $identifiers, $collection) |
|
99 | |||
100 | /** |
||
101 | * Prefetch some elements from identity map |
||
102 | * |
||
103 | * @param array $identifiers |
||
104 | * |
||
105 | * @return ArrayCollection |
||
106 | */ |
||
107 | 1 | private function prefetch(array &$identifiers) |
|
120 | } |
||
121 |