40use Psr\Log\LoggerInterface;
50 private $magicWordFactory;
59 private $specialPageFactory;
62 private $linkRendererFactory;
71 private $badFileLookup;
74 private $languageConverterFactory;
77 private $userOptionsLookup;
83 private $titleFormatter;
86 private $httpRequestFactory;
89 private $trackingCategories;
92 private $signatureValidatorFactory;
95 private $userNameUtils;
108 private $hookContainer;
117 private $mainInstance;
151 LoggerInterface $logger,
167 wfDebug( __CLASS__ .
": using default preprocessor" );
169 $this->svcOptions = $svcOptions;
170 $this->magicWordFactory = $magicWordFactory;
171 $this->contLang = $contLang;
172 $this->urlUtils = $urlUtils;
173 $this->specialPageFactory = $spFactory;
174 $this->linkRendererFactory = $linkRendererFactory;
175 $this->nsInfo = $nsInfo;
176 $this->logger = $logger;
177 $this->badFileLookup = $badFileLookup;
178 $this->languageConverterFactory = $languageConverterFactory;
179 $this->hookContainer = $hookContainer;
181 $this->wanCache = $wanCache;
182 $this->userOptionsLookup = $userOptionsLookup;
183 $this->userFactory = $userFactory;
184 $this->titleFormatter = $titleFormatter;
185 $this->httpRequestFactory = $httpRequestFactory;
186 $this->trackingCategories = $trackingCategories;
187 $this->signatureValidatorFactory = $signatureValidatorFactory;
188 $this->userNameUtils = $userNameUtils;
206 $this->magicWordFactory,
210 $this->specialPageFactory,
211 $this->linkRendererFactory,
214 $this->badFileLookup,
215 $this->languageConverterFactory,
216 $this->hookContainer,
219 $this->userOptionsLookup,
221 $this->titleFormatter,
222 $this->httpRequestFactory,
223 $this->trackingCategories,
224 $this->signatureValidatorFactory,
228 self::$inParserFactory--;
245 if ( $this->mainInstance ===
null ) {
246 $this->mainInstance = $this->create();
248 return $this->mainInstance;
263 $instance = $this->getMainInstance();
264 if ( $instance->isLocked() ) {
265 $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.
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.
Multi-datacenter aware caching interface.