getTitle(); } if ( !$title instanceof Title ) { throw new RuntimeException( 'Expected a title instance' ); } $applicationFactory = ApplicationFactory::getInstance(); $contentParser = $applicationFactory->newContentParser( $title ); $parserData = $applicationFactory->newParserData( $title, $contentParser->parse()->getOutput() ); $parserData->updateStore(); return $this; } /** * @since 2.1 * * @param array $pages * * @return PageRefresher */ public function doRefreshPoolOfPages( array $pages ) { foreach ( $pages as $page ) { $this->doRefreshByUpdateJob( $page ); } } /** * @since 2.1 * * @param mixed $title * * @return PageRefresher */ public function doRefreshByUpdateJob( $title ) { if ( $title instanceof WikiPage || $title instanceof DIWikiPage ) { $title = $title->getTitle(); } if ( is_string( $title ) ) { $title = MediaWikiServices::getInstance()->getTitleFactory()->newFromText( $title ); } if ( !$title instanceof Title ) { throw new RuntimeException( 'Expected a title instance' ); } $job = new UpdateJob( $title ); $job->run(); return $this; } }