MediaWiki REL1_40
|
Service for retrieving and storing link targets. More...
Inherits MediaWiki\Linker\LinkTargetLookup.
Public Member Functions | ||||
acquireLinkTargetId (LinkTarget $linkTarget, IDatabase $dbw) | ||||
Attempt to assign a link target ID to the given $linkTarget. | ||||
clearClassCache () | ||||
getLinkTargetById (int $linkTargetId) | ||||
Find a link target by $id. | ||||
getLinkTargetId (LinkTarget $linkTarget) | ||||
Return link target id if exists. | ||||
newLinkTargetFromRow (stdClass $row) | ||||
Instantiate a new LinkTarget object based on a $row from the linktarget table.Use this method when a linktarget row was already fetched from the DB via a join. This method just constructs a new instance and does not try fetching missing values from the DB again.
| ||||
Public Attributes | |
$this | byIdCache = [] |
$this | byTitleCache = [] |
$this | wanObjectCache = $WanObjectCache |
Service for retrieving and storing link targets.
Definition at line 37 of file LinkTargetStore.php.
MediaWiki\Linker\LinkTargetStore::acquireLinkTargetId | ( | LinkTarget | $linkTarget, |
IDatabase | $dbw ) |
Attempt to assign a link target ID to the given $linkTarget.
If it is already assigned, return the existing ID.
LinkTarget | $linkTarget | |
IDatabase | $dbw | The database connection to acquire the ID from. |
RuntimeException | if no linktarget ID has been assigned to this $linkTarget |
Implements MediaWiki\Linker\LinkTargetLookup.
Definition at line 142 of file LinkTargetStore.php.
MediaWiki\Linker\LinkTargetStore::clearClassCache | ( | ) |
Definition at line 228 of file LinkTargetStore.php.
MediaWiki\Linker\LinkTargetStore::getLinkTargetById | ( | int | $linkTargetId | ) |
Find a link target by $id.
int | $linkTargetId |
Implements MediaWiki\Linker\LinkTargetLookup.
Definition at line 93 of file LinkTargetStore.php.
MediaWiki\Linker\LinkTargetStore::getLinkTargetId | ( | LinkTarget | $linkTarget | ) |
Return link target id if exists.
LinkTarget | $linkTarget |
Implements MediaWiki\Linker\LinkTargetLookup.
Definition at line 124 of file LinkTargetStore.php.
MediaWiki\Linker\LinkTargetStore::newLinkTargetFromRow | ( | stdClass | $row | ) |
Instantiate a new LinkTarget object based on a $row from the linktarget table.Use this method when a linktarget row was already fetched from the DB via a join. This method just constructs a new instance and does not try fetching missing values from the DB again.
stdClass | $row | with the following fields:
|
Implements MediaWiki\Linker\LinkTargetLookup.
Definition at line 74 of file LinkTargetStore.php.
$this MediaWiki\Linker\LinkTargetStore::byIdCache = [] |
Definition at line 67 of file LinkTargetStore.php.
$this MediaWiki\Linker\LinkTargetStore::byTitleCache = [] |
Definition at line 68 of file LinkTargetStore.php.
$this MediaWiki\Linker\LinkTargetStore::wanObjectCache = $WanObjectCache |
Definition at line 66 of file LinkTargetStore.php.