1 | <?php |
||
14 | class InMemoryEntityLookup implements EntityLookup { |
||
15 | |||
16 | private $entities; |
||
17 | private $idsForWhichToThrowException; |
||
18 | |||
19 | /** |
||
20 | * @param Entity[] $entities |
||
21 | * @param EntityId[] $idsForWhichToThrowException |
||
22 | */ |
||
23 | public function __construct( array $entities, array $idsForWhichToThrowException ) { |
||
30 | |||
31 | /** |
||
32 | * @see EntityLookup::getEntity |
||
33 | * |
||
34 | * @param EntityId $entityId |
||
35 | * |
||
36 | * @throws StorageException |
||
37 | * @return Entity|null |
||
38 | */ |
||
39 | public function getEntity( EntityId $entityId ) { |
||
50 | |||
51 | /** |
||
52 | * @see EntityLookup::getEntity |
||
53 | * |
||
54 | * @param EntityId $entityId |
||
55 | * |
||
56 | * @throws StorageException |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function hasEntity( EntityId $entityId ) { |
||
62 | |||
63 | } |