| 1 | <?php |
||
| 9 | final class Resolver implements PromiseInterface |
||
| 10 | { |
||
| 11 | /** @var ORMInterface */ |
||
| 12 | private $orm; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | private $role; |
||
| 16 | |||
| 17 | /** @var array */ |
||
| 18 | private $scope; |
||
| 19 | |||
| 20 | /** @var bool */ |
||
| 21 | private $loaded = false; |
||
| 22 | |||
| 23 | /** @var PromiseInterface|null */ |
||
| 24 | private $entity; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param ORMInterface $orm |
||
| 28 | * @param string $role |
||
| 29 | * @param array $scope |
||
| 30 | */ |
||
| 31 | public function __construct(ORMInterface $orm, string $role, array $scope) |
||
| 37 | |||
| 38 | public function __clone() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @inheritdoc |
||
| 47 | */ |
||
| 48 | public function __loaded(): bool |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @inheritdoc |
||
| 55 | */ |
||
| 56 | public function __role(): string |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @inheritdoc |
||
| 63 | */ |
||
| 64 | public function __scope(): array |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @inheritdoc |
||
| 71 | */ |
||
| 72 | public function __resolve() |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return object|null |
||
| 86 | */ |
||
| 87 | private function getEntityFromHeap() |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @return object|null |
||
| 101 | */ |
||
| 102 | private function getEntityFromSource() |
||
| 106 | } |