getArticleID() ) { $this->title = $title; } } /** * @inheritDoc */ public function getValues() { if ( !$this->title ) { return []; } $article = WikiPage::newFromID( $this->title->getArticleID() ); if ( $article === null || !$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(); } }