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; } } } }