Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5978603
PerRowAugmentor.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
821 B
Referenced Files
None
Subscribers
None
PerRowAugmentor.php
View Options
<?php
/**
* Perform augmentation of each row and return composite result,
* indexed by ID.
*/
class
PerRowAugmentor
implements
ResultSetAugmentor
{
/**
* @var ResultAugmentor
*/
private
$rowAugmentor
;
/**
* @param ResultAugmentor $augmentor Per-result augmentor to use.
*/
public
function
__construct
(
ResultAugmentor
$augmentor
)
{
$this
->
rowAugmentor
=
$augmentor
;
}
/**
* Produce data to augment search result set.
* @param ISearchResultSet $resultSet
* @return array Data for all results
*/
public
function
augmentAll
(
ISearchResultSet
$resultSet
)
{
$data
=
[];
foreach
(
$resultSet
->
extractResults
()
as
$result
)
{
$id
=
$result
->
getTitle
()->
getArticleID
();
if
(
!
$id
)
{
continue
;
}
$data
[
$id
]
=
$this
->
rowAugmentor
->
augment
(
$result
);
}
return
$data
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 20:28 (4 d, 1 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d0/38/bfaf9cae39e42f75647dfd97f9bd
Default Alt Text
PerRowAugmentor.php (821 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment