| 1 | <?php |
||
| 15 | */ |
||
| 16 | class ItemApiLookup implements ItemLookup { |
||
| 17 | |||
| 18 | private \Wikibase\DataModel\Services\Lookup\EntityLookup $entityLookup; |
||
|
|
|||
| 19 | |||
| 20 | /** |
||
| 21 | * @param EntityLookup $entityLookup |
||
| 22 | */ |
||
| 23 | public function __construct( EntityLookup $entityLookup ) { |
||
| 24 | $this->entityLookup = $entityLookup; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @see ItemLookup::getItemForId |
||
| 29 | * @return EntityDocument|null |
||
| 30 | */ |
||
| 31 | public function getItemForId( ItemId $itemId ) { |
||
| 32 | return $this->entityLookup->getEntity( $itemId ); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |