36 use Psr\Log\LoggerInterface;
46 private $magicWordFactory;
55 private $specialPageFactory;
58 private $linkRendererFactory;
67 private $badFileLookup;
70 private $languageConverterFactory;
73 private $userOptionsLookup;
79 private $titleFormatter;
82 private $httpRequestFactory;
85 private $trackingCategories;
88 private $signatureValidatorFactory;
91 private $userNameUtils;
104 private $hookContainer;
113 private $mainInstance;
147 LoggerInterface $logger,
163 wfDebug( __CLASS__ .
": using default preprocessor" );
165 $this->svcOptions = $svcOptions;
166 $this->magicWordFactory = $magicWordFactory;
167 $this->contLang = $contLang;
168 $this->urlUtils = $urlUtils;
169 $this->specialPageFactory = $spFactory;
170 $this->linkRendererFactory = $linkRendererFactory;
171 $this->nsInfo = $nsInfo;
172 $this->logger = $logger;
173 $this->badFileLookup = $badFileLookup;
174 $this->languageConverterFactory = $languageConverterFactory;
175 $this->hookContainer = $hookContainer;
177 $this->wanCache = $wanCache;
178 $this->userOptionsLookup = $userOptionsLookup;
179 $this->userFactory = $userFactory;
180 $this->titleFormatter = $titleFormatter;
181 $this->httpRequestFactory = $httpRequestFactory;
182 $this->trackingCategories = $trackingCategories;
183 $this->signatureValidatorFactory = $signatureValidatorFactory;
184 $this->userNameUtils = $userNameUtils;
198 $this->magicWordFactory,
202 $this->specialPageFactory,
203 $this->linkRendererFactory,
206 $this->badFileLookup,
207 $this->languageConverterFactory,
208 $this->hookContainer,
211 $this->userOptionsLookup,
213 $this->titleFormatter,
214 $this->httpRequestFactory,
215 $this->trackingCategories,
216 $this->signatureValidatorFactory,
220 self::$inParserFactory--;
233 if ( $this->mainInstance ===
null ) {
234 $this->mainInstance = $this->create();
236 return $this->mainInstance;
246 $instance = $this->getMainInstance();
247 if ( $instance->isLocked() ) {
248 $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
This class performs some operations related to tracking categories, such as creating a list of all su...
Multi-datacenter aware caching interface.