37 use Psr\Log\LoggerInterface;
47 private $magicWordFactory;
56 private $specialPageFactory;
59 private $linkRendererFactory;
68 private $badFileLookup;
71 private $languageConverterFactory;
74 private $userOptionsLookup;
80 private $titleFormatter;
83 private $httpRequestFactory;
86 private $trackingCategories;
89 private $signatureValidatorFactory;
92 private $userNameUtils;
105 private $hookContainer;
114 private $mainInstance;
148 LoggerInterface $logger,
164 wfDebug( __CLASS__ .
": using default preprocessor" );
166 $this->svcOptions = $svcOptions;
167 $this->magicWordFactory = $magicWordFactory;
168 $this->contLang = $contLang;
169 $this->urlUtils = $urlUtils;
170 $this->specialPageFactory = $spFactory;
171 $this->linkRendererFactory = $linkRendererFactory;
172 $this->nsInfo = $nsInfo;
173 $this->logger = $logger;
174 $this->badFileLookup = $badFileLookup;
175 $this->languageConverterFactory = $languageConverterFactory;
176 $this->hookContainer = $hookContainer;
178 $this->wanCache = $wanCache;
179 $this->userOptionsLookup = $userOptionsLookup;
180 $this->userFactory = $userFactory;
181 $this->titleFormatter = $titleFormatter;
182 $this->httpRequestFactory = $httpRequestFactory;
183 $this->trackingCategories = $trackingCategories;
184 $this->signatureValidatorFactory = $signatureValidatorFactory;
185 $this->userNameUtils = $userNameUtils;
199 $this->magicWordFactory,
203 $this->specialPageFactory,
204 $this->linkRendererFactory,
207 $this->badFileLookup,
208 $this->languageConverterFactory,
209 $this->hookContainer,
212 $this->userOptionsLookup,
214 $this->titleFormatter,
215 $this->httpRequestFactory,
216 $this->trackingCategories,
217 $this->signatureValidatorFactory,
221 self::$inParserFactory--;
234 if ( $this->mainInstance ===
null ) {
235 $this->mainInstance = $this->create();
237 return $this->mainInstance;
247 $instance = $this->getMainInstance();
248 if ( $instance->isLocked() ) {
249 $instance = $this->create();
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
Base class for language-specific code.
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...
getInstance()
Get the main shared instance, or if it is locked, get a new instance.
static int $inParserFactory
Track calls to Parser constructor to aid in deprecation of direct Parser invocation.
__construct(ServiceOptions $svcOptions, MagicWordFactory $magicWordFactory, Language $contLang, UrlUtils $urlUtils, SpecialPageFactory $spFactory, LinkRendererFactory $linkRendererFactory, NamespaceInfo $nsInfo, LoggerInterface $logger, BadFileLookup $badFileLookup, LanguageConverterFactory $languageConverterFactory, HookContainer $hookContainer, TidyDriverBase $tidy, WANObjectCache $wanCache, UserOptionsLookup $userOptionsLookup, UserFactory $userFactory, TitleFormatter $titleFormatter, HttpRequestFactory $httpRequestFactory, TrackingCategories $trackingCategories, SignatureValidatorFactory $signatureValidatorFactory, UserNameUtils $userNameUtils)
getMainInstance()
Get the main shared instance.
create()
Creates a new parser.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
const CONSTRUCTOR_OPTIONS
Multi-datacenter aware caching interface.