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 (string)$this->title->getLatestRevID(); } }