getArticleID() ) { $this->title = $title; } } /** * @inheritDoc */ public function getValues() { if ( !$this->title ) { return []; } $article = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle( $this->title ); if ( !$article->exists() ) { return []; } $content = $article->getContent(); $text = ( $content instanceof TextContent ) ? $content->getText() : null; if ( $text === null ) { return []; } return array_filter( array_map( 'trim', explode( "\n", $text ) ) ); } /** * @inheritDoc */ public function getCacheKey() { if ( !$this->title ) { return ''; } return (string)$this->title->getLatestRevID(); } }