35use Psr\Log\LoggerInterface;
45 private $magicWordFactory;
54 private $specialPageFactory;
57 private $linkRendererFactory;
66 private $badFileLookup;
69 private $languageConverterFactory;
72 private $userOptionsLookup;
78 private $titleFormatter;
81 private $httpRequestFactory;
84 private $trackingCategories;
87 private $signatureValidatorFactory;
90 private $userNameUtils;
103 private $hookContainer;
112 private $mainInstance;
146 LoggerInterface $logger,
162 wfDebug( __CLASS__ .
": using default preprocessor" );
164 $this->svcOptions = $svcOptions;
165 $this->magicWordFactory = $magicWordFactory;
166 $this->contLang = $contLang;
167 $this->urlUtils = $urlUtils;
168 $this->specialPageFactory = $spFactory;
169 $this->linkRendererFactory = $linkRendererFactory;
170 $this->nsInfo = $nsInfo;
171 $this->logger = $logger;
172 $this->badFileLookup = $badFileLookup;
173 $this->languageConverterFactory = $languageConverterFactory;
174 $this->hookContainer = $hookContainer;
176 $this->wanCache = $wanCache;
177 $this->userOptionsLookup = $userOptionsLookup;
178 $this->userFactory = $userFactory;
179 $this->titleFormatter = $titleFormatter;
180 $this->httpRequestFactory = $httpRequestFactory;
181 $this->trackingCategories = $trackingCategories;
182 $this->signatureValidatorFactory = $signatureValidatorFactory;
183 $this->userNameUtils = $userNameUtils;
197 $this->magicWordFactory,
201 $this->specialPageFactory,
202 $this->linkRendererFactory,
205 $this->badFileLookup,
206 $this->languageConverterFactory,
207 $this->hookContainer,
210 $this->userOptionsLookup,
212 $this->titleFormatter,
213 $this->httpRequestFactory,
214 $this->trackingCategories,
215 $this->signatureValidatorFactory,
219 self::$inParserFactory--;
232 if ( $this->mainInstance ===
null ) {
233 $this->mainInstance = $this->create();
235 return $this->mainInstance;
245 $instance = $this->getMainInstance();
246 if ( $instance->isLocked() ) {
247 $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.
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...
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
This class performs some operations related to tracking categories, such as creating a list of all su...
Multi-datacenter aware caching interface.