1 | <?php |
||
9 | class PromiseResolver implements PromiseInterface |
||
10 | { |
||
11 | /** @var ORMInterface */ |
||
12 | private $orm; |
||
13 | |||
14 | /** @var string */ |
||
15 | private $target; |
||
16 | |||
17 | /** @var array */ |
||
18 | private $scope; |
||
19 | |||
20 | /** @var bool */ |
||
21 | private $loaded; |
||
22 | |||
23 | /** @var PromiseInterface|null */ |
||
24 | private $entity; |
||
25 | |||
26 | /** |
||
27 | * @param ORMInterface $orm |
||
28 | * @param string $target |
||
29 | * @param array $scope |
||
30 | */ |
||
31 | public function __construct(ORMInterface $orm, string $target, array $scope) |
||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function __loaded(): bool |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function __role(): string |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function __scope(): array |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | public function __resolve() |
||
76 | |||
77 | /** |
||
78 | * @return object|null |
||
79 | */ |
||
80 | private function getEntityFromHeap() |
||
87 | |||
88 | /** |
||
89 | * @return object|null |
||
90 | */ |
||
91 | private function getEntityFromSource() |
||
99 | } |