39use Psr\Log\LoggerInterface;
49 private $magicWordFactory;
58 private $specialPageFactory;
61 private $linkRendererFactory;
70 private $badFileLookup;
73 private $languageConverterFactory;
76 private $userOptionsLookup;
82 private $titleFormatter;
85 private $httpRequestFactory;
88 private $trackingCategories;
91 private $signatureValidatorFactory;
94 private $userNameUtils;
107 private $hookContainer;
116 private $mainInstance;
150 LoggerInterface $logger,
166 wfDebug( __CLASS__ .
": using default preprocessor" );
168 $this->svcOptions = $svcOptions;
169 $this->magicWordFactory = $magicWordFactory;
170 $this->contLang = $contLang;
171 $this->urlUtils = $urlUtils;
172 $this->specialPageFactory = $spFactory;
173 $this->linkRendererFactory = $linkRendererFactory;
174 $this->nsInfo = $nsInfo;
175 $this->logger = $logger;
176 $this->badFileLookup = $badFileLookup;
177 $this->languageConverterFactory = $languageConverterFactory;
178 $this->hookContainer = $hookContainer;
180 $this->wanCache = $wanCache;
181 $this->userOptionsLookup = $userOptionsLookup;
182 $this->userFactory = $userFactory;
183 $this->titleFormatter = $titleFormatter;
184 $this->httpRequestFactory = $httpRequestFactory;
185 $this->trackingCategories = $trackingCategories;
186 $this->signatureValidatorFactory = $signatureValidatorFactory;
187 $this->userNameUtils = $userNameUtils;
205 $this->magicWordFactory,
209 $this->specialPageFactory,
210 $this->linkRendererFactory,
213 $this->badFileLookup,
214 $this->languageConverterFactory,
215 $this->hookContainer,
218 $this->userOptionsLookup,
220 $this->titleFormatter,
221 $this->httpRequestFactory,
222 $this->trackingCategories,
223 $this->signatureValidatorFactory,
227 self::$inParserFactory--;
244 if ( $this->mainInstance ===
null ) {
245 $this->mainInstance = $this->create();
247 return $this->mainInstance;
262 $instance = $this->getMainInstance();
263 if ( $instance->isLocked() ) {
264 $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.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Multi-datacenter aware caching interface.