Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Wikibase\DataModel\Services\Lookup; | ||
|
||
use Wikibase\DataModel\Entity\EntityId; | ||
|
||
/** | ||
* Service interface for looking up an Entity's redirect target id. | ||
* | ||
* @since 5.4 | ||
* | ||
* @license GPL-2.0-or-later | ||
*/ | ||
interface EntityRedirectTargetLookup { | ||
|
||
/** | ||
* @since 5.4 | ||
*/ | ||
public const FOR_UPDATE = 'for update'; | ||
|
||
/** | ||
* Returns the redirect target associated with the given redirect ID. | ||
* | ||
* @since 2.0 | ||
* | ||
* @param EntityId $entityId | ||
* @param string $forUpdate If EntityRedirectTargetLookup::FOR_UPDATE is given the redirect will be | ||
* determined from the canonical master database. | ||
* | ||
* @return EntityId|null The ID of the redirect target, or null if $entityId does not refer to a | ||
* redirect. | ||
* @throws EntityRedirectLookupException | ||
*/ | ||
public function getRedirectForEntityId( EntityId $entityId, $forUpdate = '' ); | ||
|
||
} |