getArticleId() ) { $this->title = $title; } } /** * @inheritDoc */ public function getValues() { if ( !$this->title ) { return []; } $article = WikiPage::newFromID( $this->title->getArticleId() ); if ( $article === null || !$article->exists() ) { return []; } $text = ContentHandler::getContentText( $article->getContent() ); if ( $text === null ) { return []; } return array_filter( array_map( 'trim', explode( "\n", $text ) ) ); } /** * @inheritDoc */ public function getCacheKey() { if ( !$this->title ) { return ''; } return $this->title->getLatestRevID(); } }