Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
20 | interface ReferencedEntityIdLookup { |
||
21 | |||
22 | /** |
||
23 | * Get the referenced entity (out of $toIds), from a given entity. The starting entity, and |
||
24 | * the target entities are (potentially indirectly, via intermediate entities) linked by |
||
25 | * statements with the given property ID, pointing from the starting entity to one of the |
||
26 | * target entities. |
||
27 | * Implementations of this may or may not return the closest referenced entity (where |
||
28 | * distance is defined by the number of intermediate entities). |
||
29 | * |
||
30 | * @since 3.10 |
||
31 | * |
||
32 | * @param EntityId $fromId |
||
33 | * @param PropertyId $propertyId |
||
34 | * @param EntityId[] $toIds |
||
35 | * |
||
36 | * @return EntityId|null Returns null in case none of the target entities are referenced. |
||
37 | * @throws ReferencedEntityIdLookupException |
||
38 | */ |
||
39 | public function getReferencedEntityId( EntityId $fromId, PropertyId $propertyId, array $toIds ); |
||
40 | |||
41 | } |
||
42 |