getNamespaceInfo(); } if ( $linkRendererFactory instanceof Config ) { // Old calling convention had an array in the format of $wgParserConf as the first // parameter, and a Config as the sixth, with LinkRendererFactory as the seventh. wfDeprecated( __METHOD__ . ' with Config parameter', '1.34' ); $svcOptions = new ServiceOptions( Parser::$constructorOptions, $svcOptions, [ 'class' => Parser::class, 'preprocessorClass' => Parser::getDefaultPreprocessorClass() ], func_get_arg( 5 ) ); $linkRendererFactory = func_get_arg( 6 ); $nsInfo = func_num_args() > 7 ? func_get_arg( 7 ) : null; } $svcOptions->assertRequiredOptions( Parser::$constructorOptions ); wfDebug( __CLASS__ . ": using preprocessor: {$svcOptions->get( 'preprocessorClass' )}\n" ); $this->svcOptions = $svcOptions; $this->magicWordFactory = $magicWordFactory; $this->contLang = $contLang; $this->urlProtocols = $urlProtocols; $this->specialPageFactory = $spFactory; $this->linkRendererFactory = $linkRendererFactory; $this->nsInfo = $nsInfo; } /** * @return Parser * @since 1.32 */ public function create() : Parser { return new Parser( $this->svcOptions, $this->magicWordFactory, $this->contLang, $this, $this->urlProtocols, $this->specialPageFactory, $this->linkRendererFactory, $this->nsInfo ); } }