wiki.techinc.nl/includes/search/AugmentPageProps.php
Stanislav Malyshev 7e18cfc3b5 Infrastructure for augmenting search results
Bug: T117493
Change-Id: Ia5413a7846cc961026a2dc3542b619493bc76a23
2016-09-15 15:44:03 -07:00

20 lines
468 B
PHP

<?php
/**
* Augment search result set with values of certain page props.
*/
class AugmentPageProps implements ResultSetAugmentor {
/**
* @var array List of properties.
*/
private $propnames;
public function __construct( $propnames ) {
$this->propnames = $propnames;
}
public function augmentAll( SearchResultSet $resultSet ) {
$titles = $resultSet->extractTitles();
return PageProps::getInstance()->getProperties( $titles, $this->propnames );
}
}