41use Psr\Log\LoggerInterface;
51 private $magicWordFactory;
60 private $specialPageFactory;
63 private $linkRendererFactory;
72 private $badFileLookup;
75 private $languageConverterFactory;
78 private $languageNameUtils;
81 private $userOptionsLookup;
87 private $titleFormatter;
90 private $httpRequestFactory;
93 private $trackingCategories;
96 private $signatureValidatorFactory;
99 private $userNameUtils;
112 private $hookContainer;
121 private $mainInstance;
156 LoggerInterface $logger,
173 wfDebug( __CLASS__ .
": using default preprocessor" );
175 $this->svcOptions = $svcOptions;
176 $this->magicWordFactory = $magicWordFactory;
177 $this->contLang = $contLang;
178 $this->urlUtils = $urlUtils;
179 $this->specialPageFactory = $spFactory;
180 $this->linkRendererFactory = $linkRendererFactory;
181 $this->nsInfo = $nsInfo;
182 $this->logger = $logger;
183 $this->badFileLookup = $badFileLookup;
184 $this->languageConverterFactory = $languageConverterFactory;
185 $this->languageNameUtils = $languageNameUtils;
186 $this->hookContainer = $hookContainer;
188 $this->wanCache = $wanCache;
189 $this->userOptionsLookup = $userOptionsLookup;
190 $this->userFactory = $userFactory;
191 $this->titleFormatter = $titleFormatter;
192 $this->httpRequestFactory = $httpRequestFactory;
193 $this->trackingCategories = $trackingCategories;
194 $this->signatureValidatorFactory = $signatureValidatorFactory;
195 $this->userNameUtils = $userNameUtils;
213 $this->magicWordFactory,
217 $this->specialPageFactory,
218 $this->linkRendererFactory,
221 $this->badFileLookup,
222 $this->languageConverterFactory,
223 $this->languageNameUtils,
224 $this->hookContainer,
227 $this->userOptionsLookup,
229 $this->titleFormatter,
230 $this->httpRequestFactory,
231 $this->trackingCategories,
232 $this->signatureValidatorFactory,
236 self::$inParserFactory--;
253 if ( $this->mainInstance ===
null ) {
254 $this->mainInstance = $this->create();
256 return $this->mainInstance;
271 $instance = $this->getMainInstance();
272 if ( $instance->isLocked() ) {
273 $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.
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, LanguageNameUtils $languageNameUtils, 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.