1 | <?php |
||
17 | class ExceptionIgnoringEntityLookup implements EntityLookup { |
||
18 | |||
19 | /** |
||
20 | * @var EntityLookup |
||
21 | */ |
||
22 | private $lookup; |
||
23 | |||
24 | public function __construct( EntityLookup $lookup ) { |
||
27 | |||
28 | /** |
||
29 | * Attempt to retrieve the entity, |
||
30 | * returning `null` if any errors occur. |
||
31 | * |
||
32 | * @param EntityId $entityId |
||
33 | * @return EntityDocument|null |
||
34 | */ |
||
35 | public function getEntity( EntityId $entityId ) { |
||
42 | |||
43 | /** |
||
44 | * Returns whether the given entity can potentially be looked up using {@link getEntity()}. |
||
45 | * Note that this does not guarantee {@link getEntity()} will return an {@link EntityDocument} – |
||
46 | * it may still return `null` if an error occurs retrieving the entity. |
||
47 | * |
||
48 | * @param EntityId $entityId |
||
49 | * @return bool |
||
50 | */ |
||
51 | public function hasEntity( EntityId $entityId ) { |
||
54 | |||
55 | } |
||
56 |