/** * @param Page $page * @param ParserOptions $parserOptions ParserOptions to use for the parse * @param int $revid ID of the revision being parsed. * @param bool $useParserCache Whether to use the parser cache. * operation. * @param Content|string $content Content to parse or null to load it; may * also be given as a wikitext string, for BC. */ public function __construct(Page $page, ParserOptions $parserOptions, $revid, $useParserCache, $content = null) { if (is_string($content)) { // BC: old style call $modelId = $page->getRevision()->getContentModel(); $format = $page->getRevision()->getContentFormat(); $content = ContentHandler::makeContent($content, $page->getTitle(), $modelId, $format); } $this->page = $page; $this->revid = $revid; $this->cacheable = $useParserCache; $this->parserOptions = $parserOptions; $this->content = $content; $this->cacheKey = ParserCache::singleton()->getKey($page, $parserOptions); parent::__construct('ArticleView', $this->cacheKey . ':revid:' . $revid); }