1 | <?php |
||
11 | class CollectionFactory |
||
12 | { |
||
13 | /** |
||
14 | * This method creates a custom collection for the entity defined by ClassMetadata $class. |
||
15 | * If no custom collection is specified, it will fallback to PersistentCollection. |
||
16 | * The custom collection must extend from PersistentCollection. |
||
17 | * |
||
18 | * @param EntityManagerInterface $em |
||
19 | * @param ClassMetadata $class |
||
20 | * @param Collection $collection the contents of the specific collection to create |
||
21 | * |
||
22 | * @return PersistentCollection |
||
23 | */ |
||
24 | 494 | public function create(EntityManagerInterface $em, ClassMetadata $class, Collection $collection) |
|
39 | |||
40 | /** |
||
41 | * This method creates the default collection to be used in the UnitOfWork. |
||
42 | * |
||
43 | * @param EntityManagerInterface $em |
||
44 | * @param ClassMetadata $class |
||
45 | * @param Collection $collection the contents of the specific collection to create |
||
46 | * |
||
47 | * @return PersistentCollection |
||
48 | */ |
||
49 | 772 | public function createDefault(EntityManagerInterface $em, ClassMetadata $class, Collection $collection) |
|
53 | } |
||
54 |