27use Psr\Log\LoggerInterface;
28use Psr\Log\NullLogger;
100 wfDeprecated( __METHOD__ .
' with no NamespaceInfo argument',
'1.34' );
101 $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
106 wfDeprecated( __METHOD__ .
' with Config parameter',
'1.34' );
109 [
'class' => Parser::class,
110 'preprocessorClass' => Parser::getDefaultPreprocessorClass() ],
114 $nsInfo = func_num_args() > 7 ? func_get_arg( 7 ) :
null;
118 wfDebug( __CLASS__ .
": using preprocessor: {$svcOptions->get( 'preprocessorClass' )}\n" );
121 $this->magicWordFactory = $magicWordFactory;
122 $this->contLang = $contLang;
124 $this->specialPageFactory = $spFactory;
127 $this->logger =
$logger ?:
new NullLogger();
129 MediaWikiServices::getInstance()->getBadFileLookup();
139 $this->magicWordFactory,
143 $this->specialPageFactory,
144 $this->linkRendererFactory,
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Internationalisation code.
A factory that stores information about MagicWords, and creates them on demand with caching.
Factory for handling the special page list and generating SpecialPage objects.
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
SpecialPageFactory $specialPageFactory
LinkRendererFactory $linkRendererFactory
MagicWordFactory $magicWordFactory
ServiceOptions $svcOptions
BadFileLookup $badFileLookup
__construct( $svcOptions, MagicWordFactory $magicWordFactory, Language $contLang, $urlProtocols, SpecialPageFactory $spFactory, $linkRendererFactory, $nsInfo=null, $logger=null, BadFileLookup $badFileLookup=null)
Old parameter list, which we support for backwards compatibility, were: array $parserConf See $wgPars...
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
return[ 'OATHAuth'=> function(MediaWikiServices $services) { return new OATHAuth($services->getMainConfig(), $services->getDBLoadBalancerFactory());}, 'OATHUserRepository'=> function(MediaWikiServices $services) { global $wgOATHAuthDatabase;$auth=$services->getService( 'OATHAuth');return new OATHUserRepository($services->getDBLoadBalancerFactory() ->getMainLB( $wgOATHAuthDatabase), new \HashBagOStuff(['maxKey'=> 5]), $auth);}]
Interface for configuration instances.