39 private $titleFormatter;
48 $this->pageStore = $pageStore;
49 $this->titleFormatter = $titleFormatter;
56 $ids = array_map(
'intval', preg_split(
'/\n/', $value, -1, PREG_SPLIT_NO_EMPTY ) );
57 $pageRecords = $this->getPageStore()
58 ->newSelectQueryBuilder()
59 ->wherePageIds( $ids )
60 ->caller( __METHOD__ )
62 return implode(
"\n", array_map(
function ( $pageRecord ) {
63 return $this->getTitleFormatter()->getPrefixedText( $pageRecord );
64 }, iterator_to_array( $pageRecords ) ) );
71 $titles = trim( $titles );
72 if ( $titles !==
'' ) {
73 $titles = preg_split(
'/\n/', $titles, -1, PREG_SPLIT_NO_EMPTY );
74 $ids = array_map(
function ( $text ) {
75 $title = $this->getPageStore()->getPageByText( $text );
77 return $title->getId();
82 return implode(
"\n", $ids );
92 private function getPageStore():
PageStore {
94 return $this->pageStore;
102 return $this->titleFormatter;
Interface for a page that is (or could be, or used to be) an editable wiki page.
getId( $wikiId=self::LOCAL)
Returns the page ID.