1 | <?php |
||
25 | class ProxyFactory |
||
26 | { |
||
27 | /** |
||
28 | * @var LazyLoadingGhostFactory |
||
29 | */ |
||
30 | private $proxyFactory; |
||
31 | |||
32 | /** |
||
33 | * @var EventDispatcherInterface |
||
34 | */ |
||
35 | private $dispatcher; |
||
36 | |||
37 | /** |
||
38 | * @var DocumentRegistry |
||
39 | */ |
||
40 | private $registry; |
||
41 | |||
42 | /** |
||
43 | * @var MetadataFactoryInterface |
||
44 | */ |
||
45 | private $metadataFactory; |
||
46 | |||
47 | /** |
||
48 | * @param LazyLoadingGhostFactory $proxyFactory |
||
49 | * @param EventDispatcherInterface $dispatcher |
||
50 | * @param DocumentRegistry $registry |
||
51 | * @param MetadataFactoryInterface $metadataFactory |
||
52 | */ |
||
53 | public function __construct( |
||
64 | |||
65 | /** |
||
66 | * Create a new proxy object from the given document for |
||
67 | * the given target node. |
||
68 | * |
||
69 | * TODO: We only pass the document here in order to correctly evaluate its locale |
||
70 | * later. I wonder if it necessary. |
||
71 | * |
||
72 | * @param object $fromDocument |
||
73 | * @param NodeInterface $targetNode |
||
74 | * @param array $options |
||
75 | * |
||
76 | * @return \ProxyManager\Proxy\GhostObjectInterface |
||
77 | */ |
||
78 | public function createProxyForNode($fromDocument, NodeInterface $targetNode, $options = []) |
||
116 | |||
117 | /** |
||
118 | * Create a new children collection for the given document. |
||
119 | * |
||
120 | * @param object $document |
||
121 | * |
||
122 | * @return ChildrenCollection |
||
123 | */ |
||
124 | public function createChildrenCollection($document, array $options = []) |
||
136 | |||
137 | /** |
||
138 | * Create a new collection of referrers from a list of referencing items. |
||
139 | * |
||
140 | * @param $document |
||
141 | * |
||
142 | * @return ReferrerCollection |
||
143 | */ |
||
144 | public function createReferrerCollection($document) |
||
155 | } |
||
156 |