MediaWiki  1.27.1
ParserOptions.php
Go to the documentation of this file.
1 <?php
33 
38 
43 
48 
53 
57  private $mDateFormat = null;
58 
62  private $mEditSection = true;
63 
68 
72  private $mTidy = false;
73 
77  private $mInterfaceMessage = false;
78 
82  private $mTargetLanguage = null;
83 
88 
93 
98 
103 
108 
113 
117  private $mRemoveComments = true;
118 
123  [ 'Parser', 'statelessFetchRevision' ];
124 
129  [ 'Parser', 'statelessFetchTemplate' ];
130 
134  private $mEnableLimitReport = false;
135 
139  private $mTimestamp;
140 
145 
151 
155  private $mPreSaveTransform = true;
156 
161 
166 
171 
175  private $mThumbSize;
176 
181 
185  private $mUserLang;
186 
191  private $mUser;
192 
196  private $mIsPreview = false;
197 
201  private $mIsSectionPreview = false;
202 
206  private $mIsPrintable = false;
207 
211  private $mExtraKey = '';
212 
216  private $onAccessCallback = null;
217 
223  private $redirectTarget = null;
224 
225  public function getInterwikiMagic() {
226  return $this->mInterwikiMagic;
227  }
228 
229  public function getAllowExternalImages() {
231  }
232 
233  public function getAllowExternalImagesFrom() {
235  }
236 
237  public function getEnableImageWhitelist() {
239  }
240 
241  public function getEditSection() {
242  return $this->mEditSection;
243  }
244 
245  public function getNumberHeadings() {
246  $this->optionUsed( 'numberheadings' );
247 
248  return $this->mNumberHeadings;
249  }
250 
251  public function getAllowSpecialInclusion() {
253  }
254 
255  public function getTidy() {
256  return $this->mTidy;
257  }
258 
259  public function getInterfaceMessage() {
261  }
262 
263  public function getTargetLanguage() {
264  return $this->mTargetLanguage;
265  }
266 
267  public function getMaxIncludeSize() {
268  return $this->mMaxIncludeSize;
269  }
270 
271  public function getMaxPPNodeCount() {
272  return $this->mMaxPPNodeCount;
273  }
274 
275  public function getMaxGeneratedPPNodeCount() {
277  }
278 
279  public function getMaxPPExpandDepth() {
281  }
282 
283  public function getMaxTemplateDepth() {
285  }
286 
287  /* @since 1.20 */
290  }
291 
292  public function getRemoveComments() {
293  return $this->mRemoveComments;
294  }
295 
296  /* @since 1.24 */
297  public function getCurrentRevisionCallback() {
299  }
300 
301  public function getTemplateCallback() {
303  }
304 
305  public function getEnableLimitReport() {
307  }
308 
309  public function getCleanSignatures() {
311  }
312 
313  public function getExternalLinkTarget() {
315  }
316 
317  public function getDisableContentConversion() {
319  }
320 
321  public function getDisableTitleConversion() {
323  }
324 
325  public function getThumbSize() {
326  $this->optionUsed( 'thumbsize' );
327 
328  return $this->mThumbSize;
329  }
330 
331  public function getStubThreshold() {
332  $this->optionUsed( 'stubthreshold' );
333 
334  return $this->mStubThreshold;
335  }
336 
337  public function getIsPreview() {
338  return $this->mIsPreview;
339  }
340 
341  public function getIsSectionPreview() {
343  }
344 
345  public function getIsPrintable() {
346  $this->optionUsed( 'printable' );
347 
348  return $this->mIsPrintable;
349  }
350 
351  public function getUser() {
352  return $this->mUser;
353  }
354 
355  public function getPreSaveTransform() {
357  }
358 
359  public function getDateFormat() {
360  $this->optionUsed( 'dateformat' );
361  if ( !isset( $this->mDateFormat ) ) {
362  $this->mDateFormat = $this->mUser->getDatePreference();
363  }
364  return $this->mDateFormat;
365  }
366 
367  public function getTimestamp() {
368  if ( !isset( $this->mTimestamp ) ) {
369  $this->mTimestamp = wfTimestampNow();
370  }
371  return $this->mTimestamp;
372  }
373 
391  public function getUserLangObj() {
392  $this->optionUsed( 'userlang' );
393  return $this->mUserLang;
394  }
395 
408  public function getUserLang() {
409  return $this->getUserLangObj()->getCode();
410  }
411 
412  public function setInterwikiMagic( $x ) {
413  return wfSetVar( $this->mInterwikiMagic, $x );
414  }
415 
416  public function setAllowExternalImages( $x ) {
417  return wfSetVar( $this->mAllowExternalImages, $x );
418  }
419 
420  public function setAllowExternalImagesFrom( $x ) {
421  return wfSetVar( $this->mAllowExternalImagesFrom, $x );
422  }
423 
424  public function setEnableImageWhitelist( $x ) {
425  return wfSetVar( $this->mEnableImageWhitelist, $x );
426  }
427 
428  public function setDateFormat( $x ) {
429  return wfSetVar( $this->mDateFormat, $x );
430  }
431 
432  public function setEditSection( $x ) {
433  return wfSetVar( $this->mEditSection, $x );
434  }
435 
436  public function setNumberHeadings( $x ) {
437  return wfSetVar( $this->mNumberHeadings, $x );
438  }
439 
440  public function setAllowSpecialInclusion( $x ) {
441  return wfSetVar( $this->mAllowSpecialInclusion, $x );
442  }
443 
444  public function setTidy( $x ) {
445  return wfSetVar( $this->mTidy, $x );
446  }
447 
448  public function setInterfaceMessage( $x ) {
449  return wfSetVar( $this->mInterfaceMessage, $x );
450  }
451 
452  public function setTargetLanguage( $x ) {
453  return wfSetVar( $this->mTargetLanguage, $x, true );
454  }
455 
456  public function setMaxIncludeSize( $x ) {
457  return wfSetVar( $this->mMaxIncludeSize, $x );
458  }
459 
460  public function setMaxPPNodeCount( $x ) {
461  return wfSetVar( $this->mMaxPPNodeCount, $x );
462  }
463 
464  public function setMaxGeneratedPPNodeCount( $x ) {
465  return wfSetVar( $this->mMaxGeneratedPPNodeCount, $x );
466  }
467 
468  public function setMaxTemplateDepth( $x ) {
469  return wfSetVar( $this->mMaxTemplateDepth, $x );
470  }
471 
472  /* @since 1.20 */
473  public function setExpensiveParserFunctionLimit( $x ) {
474  return wfSetVar( $this->mExpensiveParserFunctionLimit, $x );
475  }
476 
477  public function setRemoveComments( $x ) {
478  return wfSetVar( $this->mRemoveComments, $x );
479  }
480 
481  /* @since 1.24 */
482  public function setCurrentRevisionCallback( $x ) {
483  return wfSetVar( $this->mCurrentRevisionCallback, $x );
484  }
485 
486  public function setTemplateCallback( $x ) {
487  return wfSetVar( $this->mTemplateCallback, $x );
488  }
489 
490  public function enableLimitReport( $x = true ) {
491  return wfSetVar( $this->mEnableLimitReport, $x );
492  }
493 
494  public function setTimestamp( $x ) {
495  return wfSetVar( $this->mTimestamp, $x );
496  }
497 
498  public function setCleanSignatures( $x ) {
499  return wfSetVar( $this->mCleanSignatures, $x );
500  }
501 
502  public function setExternalLinkTarget( $x ) {
503  return wfSetVar( $this->mExternalLinkTarget, $x );
504  }
505 
506  public function disableContentConversion( $x = true ) {
507  return wfSetVar( $this->mDisableContentConversion, $x );
508  }
509 
510  public function disableTitleConversion( $x = true ) {
511  return wfSetVar( $this->mDisableTitleConversion, $x );
512  }
513 
514  public function setUserLang( $x ) {
515  if ( is_string( $x ) ) {
516  $x = Language::factory( $x );
517  }
518 
519  return wfSetVar( $this->mUserLang, $x );
520  }
521 
522  public function setThumbSize( $x ) {
523  return wfSetVar( $this->mThumbSize, $x );
524  }
525 
526  public function setStubThreshold( $x ) {
527  return wfSetVar( $this->mStubThreshold, $x );
528  }
529 
530  public function setPreSaveTransform( $x ) {
531  return wfSetVar( $this->mPreSaveTransform, $x );
532  }
533 
534  public function setIsPreview( $x ) {
535  return wfSetVar( $this->mIsPreview, $x );
536  }
537 
538  public function setIsSectionPreview( $x ) {
539  return wfSetVar( $this->mIsSectionPreview, $x );
540  }
541 
542  public function setIsPrintable( $x ) {
543  return wfSetVar( $this->mIsPrintable, $x );
544  }
545 
556  function setRedirectTarget( $title ) {
557  $this->redirectTarget = $title;
558  }
559 
566  function getRedirectTarget() {
567  return $this->redirectTarget;
568  }
569 
574  public function addExtraKey( $key ) {
575  $this->mExtraKey .= '!' . $key;
576  }
577 
583  public function __construct( $user = null, $lang = null ) {
584  if ( $user === null ) {
585  global $wgUser;
586  if ( $wgUser === null ) {
587  $user = new User;
588  } else {
589  $user = $wgUser;
590  }
591  }
592  if ( $lang === null ) {
593  global $wgLang;
594  if ( !StubObject::isRealObject( $wgLang ) ) {
595  $wgLang->_unstub();
596  }
597  $lang = $wgLang;
598  }
599  $this->initialiseFromUser( $user, $lang );
600  }
601 
607  public static function newFromAnon() {
609  return new ParserOptions( new User, $wgContLang );
610  }
611 
619  public static function newFromUser( $user ) {
620  return new ParserOptions( $user );
621  }
622 
630  public static function newFromUserAndLang( User $user, Language $lang ) {
631  return new ParserOptions( $user, $lang );
632  }
633 
640  public static function newFromContext( IContextSource $context ) {
641  return new ParserOptions( $context->getUser(), $context->getLanguage() );
642  }
643 
650  private function initialiseFromUser( $user, $lang ) {
651  global $wgInterwikiMagic, $wgAllowExternalImages,
652  $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion,
653  $wgMaxArticleSize, $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth,
654  $wgCleanSignatures, $wgExternalLinkTarget, $wgExpensiveParserFunctionLimit,
655  $wgMaxGeneratedPPNodeCount, $wgDisableLangConversion, $wgDisableTitleConversion;
656 
657  // *UPDATE* ParserOptions::matches() if any of this changes as needed
658  $this->mInterwikiMagic = $wgInterwikiMagic;
659  $this->mAllowExternalImages = $wgAllowExternalImages;
660  $this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom;
661  $this->mEnableImageWhitelist = $wgEnableImageWhitelist;
662  $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
663  $this->mMaxIncludeSize = $wgMaxArticleSize * 1024;
664  $this->mMaxPPNodeCount = $wgMaxPPNodeCount;
665  $this->mMaxGeneratedPPNodeCount = $wgMaxGeneratedPPNodeCount;
666  $this->mMaxPPExpandDepth = $wgMaxPPExpandDepth;
667  $this->mMaxTemplateDepth = $wgMaxTemplateDepth;
668  $this->mExpensiveParserFunctionLimit = $wgExpensiveParserFunctionLimit;
669  $this->mCleanSignatures = $wgCleanSignatures;
670  $this->mExternalLinkTarget = $wgExternalLinkTarget;
671  $this->mDisableContentConversion = $wgDisableLangConversion;
672  $this->mDisableTitleConversion = $wgDisableLangConversion || $wgDisableTitleConversion;
673 
674  $this->mUser = $user;
675  $this->mNumberHeadings = $user->getOption( 'numberheadings' );
676  $this->mThumbSize = $user->getOption( 'thumbsize' );
677  $this->mStubThreshold = $user->getStubThreshold();
678  $this->mUserLang = $lang;
679 
680  }
681 
691  public function matches( ParserOptions $other ) {
692  $fields = array_keys( get_class_vars( __CLASS__ ) );
693  $fields = array_diff( $fields, [
694  'mEnableLimitReport', // only effects HTML comments
695  'onAccessCallback', // only used for ParserOutput option tracking
696  ] );
697  foreach ( $fields as $field ) {
698  if ( !is_object( $this->$field ) && $this->$field !== $other->$field ) {
699  return false;
700  }
701  }
702  // Check the object and lazy-loaded options
703  return (
704  $this->mUserLang->getCode() === $other->mUserLang->getCode() &&
705  $this->getDateFormat() === $other->getDateFormat()
706  );
707  }
708 
714  public function registerWatcher( $callback ) {
715  $this->onAccessCallback = $callback;
716  }
717 
726  public function optionUsed( $optionName ) {
727  if ( $this->onAccessCallback ) {
728  call_user_func( $this->onAccessCallback, $optionName );
729  }
730  }
731 
738  public static function legacyOptions() {
739  return [
740  'stubthreshold',
741  'numberheadings',
742  'userlang',
743  'thumbsize',
744  'editsection',
745  'printable'
746  ];
747  }
748 
765  public function optionsHash( $forOptions, $title = null ) {
767 
768  // FIXME: Once the cache key is reorganized this argument
769  // can be dropped. It was used when the math extension was
770  // part of core.
771  $confstr = '*';
772 
773  // Space assigned for the stubthreshold but unused
774  // since it disables the parser cache, its value will always
775  // be 0 when this function is called by parsercache.
776  if ( in_array( 'stubthreshold', $forOptions ) ) {
777  $confstr .= '!' . $this->mStubThreshold;
778  } else {
779  $confstr .= '!*';
780  }
781 
782  if ( in_array( 'dateformat', $forOptions ) ) {
783  $confstr .= '!' . $this->getDateFormat();
784  }
785 
786  if ( in_array( 'numberheadings', $forOptions ) ) {
787  $confstr .= '!' . ( $this->mNumberHeadings ? '1' : '' );
788  } else {
789  $confstr .= '!*';
790  }
791 
792  if ( in_array( 'userlang', $forOptions ) ) {
793  $confstr .= '!' . $this->mUserLang->getCode();
794  } else {
795  $confstr .= '!*';
796  }
797 
798  if ( in_array( 'thumbsize', $forOptions ) ) {
799  $confstr .= '!' . $this->mThumbSize;
800  } else {
801  $confstr .= '!*';
802  }
803 
804  // add in language specific options, if any
805  // @todo FIXME: This is just a way of retrieving the url/user preferred variant
806  if ( !is_null( $title ) ) {
807  $confstr .= $title->getPageLanguage()->getExtraHashOptions();
808  } else {
810  $confstr .= $wgContLang->getExtraHashOptions();
811  }
812 
813  $confstr .= $wgRenderHashAppend;
814 
815  // @note: as of Feb 2015, core never sets the editsection flag, since it uses
816  // <mw:editsection> tags to inject editsections on the fly. However, extensions
817  // may be using it by calling ParserOption::optionUsed resp. ParserOutput::registerOption
818  // directly. At least Wikibase does at this point in time.
819  if ( !in_array( 'editsection', $forOptions ) ) {
820  $confstr .= '!*';
821  } elseif ( !$this->mEditSection ) {
822  $confstr .= '!edit=0';
823  }
824 
825  if ( $this->mIsPrintable && in_array( 'printable', $forOptions ) ) {
826  $confstr .= '!printable=1';
827  }
828 
829  if ( $this->mExtraKey != '' ) {
830  $confstr .= $this->mExtraKey;
831  }
832 
833  // Give a chance for extensions to modify the hash, if they have
834  // extra options or other effects on the parser cache.
835  Hooks::run( 'PageRenderingHash', [ &$confstr, $this->getUser(), &$forOptions ] );
836 
837  // Make it a valid memcached key fragment
838  $confstr = str_replace( ' ', '_', $confstr );
839 
840  return $confstr;
841  }
842 
853  public function setupFakeRevision( $title, $content, $user ) {
854  $oldCallback = $this->setCurrentRevisionCallback(
855  function (
856  $titleToCheck, $parser = false ) use ( $title, $content, $user, &$oldCallback
857  ) {
858  if ( $titleToCheck->equals( $title ) ) {
859  return new Revision( [
860  'page' => $title->getArticleID(),
861  'user_text' => $user->getName(),
862  'user' => $user->getId(),
863  'parent_id' => $title->getLatestRevID(),
864  'title' => $title,
865  'content' => $content
866  ] );
867  } else {
868  return call_user_func( $oldCallback, $titleToCheck, $parser );
869  }
870  }
871  );
872 
874  $wgHooks['TitleExists'][] =
875  function ( $titleToCheck, &$exists ) use ( $title ) {
876  if ( $titleToCheck->equals( $title ) ) {
877  $exists = true;
878  }
879  };
880  end( $wgHooks['TitleExists'] );
881  $key = key( $wgHooks['TitleExists'] );
882  LinkCache::singleton()->clearBadLink( $title->getPrefixedDBkey() );
883  return new ScopedCallback( function () use ( $title, $key ) {
885  unset( $wgHooks['TitleExists'][$key] );
886  LinkCache::singleton()->clearLink( $title );
887  } );
888  }
889 }
static newFromContext(IContextSource $context)
Get a ParserOptions object from a IContextSource object.
Interface for objects which can provide a MediaWiki context on request.
$wgMaxArticleSize
Maximum article size in kilobytes.
$mIsSectionPreview
Parsing the page for a "preview" operation on a single section?
static legacyOptions()
Returns the full array of options that would have been used by in 1.16.
disableTitleConversion($x=true)
magic word the default is to use $key to get the and $key value or $key value text $key value html to format the value $key
Definition: hooks.txt:2321
$context
Definition: load.php:44
$mAllowExternalImagesFrom
If not, any exception?
$mMaxGeneratedPPNodeCount
Maximum number of nodes generated by Preprocessor::preprocessToObj()
$mDateFormat
Date format index.
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
$mIsPreview
Parsing the page for a "preview" operation?
Set options of the Parser.
if(!isset($args[0])) $lang
setAllowSpecialInclusion($x)
static newFromUserAndLang(User $user, Language $lang)
Get a ParserOptions object from a given user and language.
initialiseFromUser($user, $lang)
Get user options.
setupFakeRevision($title, $content, $user)
Sets a hook to force that a page exists, and sets a current revision callback to return a revision wi...
$mExternalLinkTarget
Target attribute for external links.
$wgHooks['ArticleShow'][]
Definition: hooks.txt:110
when a variable name is used in a it is silently declared as a new local masking the global
Definition: design.txt:93
static newFromUser($user)
Get a ParserOptions object from a given user.
User $mUser
Stored user object.
magic word & $parser
Definition: hooks.txt:2321
Title null $redirectTarget
If the page being parsed is a redirect, this should hold the redirect target.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
Definition: design.txt:56
$mStubThreshold
Maximum article size of an article to be marked as "stub".
$mTimestamp
Timestamp used for {{CURRENTDAY}} etc.
$mMaxTemplateDepth
Maximum recursion depth for templates within templates.
$mTargetLanguage
Overrides $mInterfaceMessage with arbitrary language.
getUser()
Get the User object.
Class for asserting that a callback happens when an dummy object leaves scope.
$wgRenderHashAppend
Append a configured value to the parser cache and the sitenotice key so that they can be kept separat...
static singleton()
Get an instance of this class.
Definition: LinkCache.php:61
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an and does all the work of translating among various forms such as plain database key
Definition: design.txt:25
$mRemoveComments
Remove HTML comments.
$mAllowSpecialInclusion
Allow inclusion of special pages?
$mCleanSignatures
Clean up signature texts?
setEnableImageWhitelist($x)
registerWatcher($callback)
Registers a callback for tracking which ParserOptions which are used.
getRedirectTarget()
Get the previously-set redirect target.
$mTemplateCallback
Callback for template fetching.
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
$mMaxPPNodeCount
Maximum number of nodes touched by PPFrame::expand()
$mIsPrintable
Parsing the printable version of the page?
getUserLangObj()
Get the user language used by the parser for this page and split the parser cache.
$mPreSaveTransform
Transform wiki markup when saving the page?
$wgDisableTitleConversion
Whether to enable language variant conversion for links.
$mInterfaceMessage
Which lang to call for PLURAL and GRAMMAR.
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:912
$wgInterwikiMagic
Treat language links as magic connectors, not inline links.
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition: Hooks.php:131
getUserLang()
Same as getUserLangObj() but returns a string instead.
setAllowExternalImages($x)
getLanguage()
Get the Language object.
$mDisableTitleConversion
Whether title conversion should be disabled.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
$wgDisableLangConversion
Whether to enable language variant conversion.
static newFromAnon()
Get a ParserOptions object for an anonymous user.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
Definition: hooks.txt:242
setRedirectTarget($title)
Set the redirect target.
$mInterwikiMagic
Interlanguage links are removed and returned in an array.
disableContentConversion($x=true)
$mExpensiveParserFunctionLimit
Maximum number of calls per parse to expensive parser functions.
setAllowExternalImagesFrom($x)
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
wfSetVar(&$dest, $source, $force=false)
Sets dest to source and returns the original value of dest If source is NULL, it just returns the val...
$mMaxIncludeSize
Maximum size of template expansions, in bytes.
$onAccessCallback
Function to be called when an option is accessed.
$mDisableContentConversion
Whether content conversion should be disabled.
$mExtraKey
Extra key that should be present in the caching key.
$mEnableLimitReport
Enable limit report in an HTML comment on output.
enableLimitReport($x=true)
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content $content
Definition: hooks.txt:1004
setMaxGeneratedPPNodeCount($x)
$mUserLang
Language object of the User language.
$mMaxPPExpandDepth
Maximum recursion depth in PPFrame::expand()
addExtraKey($key)
Extra key that should be present in the parser cache key.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
Definition: design.txt:56
$mEditSection
Create "edit section" links?
$mAllowExternalImages
Allow external images inline?
$mCurrentRevisionCallback
Callback for current revision fetching.
static factory($code)
Get a cached or new language object for a given language code.
Definition: Language.php:179
$mTidy
Use tidy to cleanup output HTML?
optionsHash($forOptions, $title=null)
Generate a hash string with the values set on these ParserOptions for the keys given in the array...
$mThumbSize
Thumb size preferred by the user.
$mEnableImageWhitelist
If not or it doesn't match, should we check an on-wiki whitelist?
setCurrentRevisionCallback($x)
__construct($user=null, $lang=null)
Constructor.
static isRealObject($obj)
Returns a bool value whenever $obj is a stub object.
Definition: StubObject.php:74
setExpensiveParserFunctionLimit($x)
optionUsed($optionName)
Called when an option is accessed.
matches(ParserOptions $other)
Check if these options match that of another options set.
$wgUser
Definition: Setup.php:794
$mNumberHeadings
Automatically number headings?
getExpensiveParserFunctionLimit()