1 | <?php |
||
28 | final class ProxyFactory implements PromiseFactoryInterface, SingletonInterface |
||
29 | { |
||
30 | /** @var Extractor */ |
||
31 | private $extractor; |
||
32 | |||
33 | /** @var Printer */ |
||
34 | private $printer; |
||
35 | |||
36 | /** @var MaterializerInterface */ |
||
37 | private $materializer; |
||
38 | |||
39 | /** @var Names */ |
||
40 | private $names; |
||
41 | |||
42 | /** @var InstantiatorInterface */ |
||
43 | private $instantiator; |
||
44 | |||
45 | /** @var array */ |
||
46 | private $resolved = []; |
||
47 | |||
48 | /** @var array */ |
||
49 | private $instantiateMethods = []; |
||
50 | |||
51 | /** |
||
52 | * @param Extractor $extractor |
||
53 | * @param Printer $printer |
||
54 | * @param InstantiatorInterface|null $instantiator |
||
55 | * @param MaterializerInterface|null $materializer |
||
56 | * @param Names|null $names |
||
57 | */ |
||
58 | public function __construct( |
||
71 | |||
72 | /** |
||
73 | * @param ORMInterface $orm |
||
74 | * @param string $role |
||
75 | * @param array $scope |
||
76 | * @return PromiseInterface |
||
77 | * @throws ProxyFactoryException |
||
78 | * @throws ExceptionInterface |
||
79 | * @throws ReflectionException |
||
80 | */ |
||
81 | public function promise(ORMInterface $orm, string $role, array $scope): PromiseInterface |
||
113 | |||
114 | /** |
||
115 | * @param ReflectionClass $reflection |
||
116 | * @param string $className |
||
117 | * @param ORMInterface $orm |
||
118 | * @param string $role |
||
119 | * @param array $scope |
||
120 | * @return PromiseInterface |
||
121 | * @throws ExceptionInterface |
||
122 | * @throws ReflectionException |
||
123 | */ |
||
124 | private function instantiate( |
||
142 | } |
||
143 |