Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5986130
TitleLocalCache.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
TitleLocalCache.php
View Options
<?php
namespace
MediaWiki\Extension\Notifications\Cache
;
use
MediaWiki\Page\PageRecord
;
use
MediaWiki\Page\PageStore
;
use
MediaWiki\Title\TitleFactory
;
/**
* Cache class that maps article id to Title object.
* @fixme There should be no need for this class. Core's PageStore should be responsible for caching, if it's
* deemed necessary. See also T344124.
*/
class
TitleLocalCache
extends
LocalCache
{
private
PageStore
$pageStore
;
private
TitleFactory
$titleFactory
;
public
function
__construct
(
PageStore
$pageStore
,
TitleFactory
$titleFactory
)
{
parent
::
__construct
();
$this
->
pageStore
=
$pageStore
;
$this
->
titleFactory
=
$titleFactory
;
}
/**
* @inheritDoc
*/
protected
function
resolve
(
array
$lookups
)
{
if
(
$lookups
)
{
$titles
=
$this
->
pageStore
->
newSelectQueryBuilder
()
->
wherePageIds
(
$lookups
)
->
caller
(
__METHOD__
)
->
fetchPageRecords
();
/** @var PageRecord $title */
foreach
(
$titles
as
$title
)
{
$title
=
$this
->
titleFactory
->
castFromPageIdentity
(
$title
);
yield
$title
->
getArticleID
()
=>
$title
;
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Oct 4, 00:00 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
05/75/162d255f36a44164c73a6136780a
Default Alt Text
TitleLocalCache.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment