MediaWiki  1.23.15
ParserOptions.php
Go to the documentation of this file.
1 <?php
32 
37 
42 
47 
52 
56  var $mDateFormat = null;
57 
61  var $mEditSection = true;
62 
67 
71  var $mTidy = false;
72 
76  var $mInterfaceMessage = false;
77 
81  var $mTargetLanguage = null;
82 
87 
92 
97 
102 
107 
112 
116  var $mRemoveComments = true;
117 
122  array( 'Parser', 'statelessFetchTemplate' );
123 
127  var $mEnableLimitReport = false;
128 
133 
138 
146 
150  var $mPreSaveTransform = true;
151 
156 
161 
166 
171 
176 
181 
186  var $mUser;
187 
191  var $mIsPreview = false;
192 
196  var $mIsSectionPreview = false;
197 
201  var $mIsPrintable = false;
202 
206  var $mExtraKey = '';
207 
211  protected $onAccessCallback = null;
212 
217  function getEditSection() { return $this->mEditSection; }
218  function getNumberHeadings() { $this->optionUsed( 'numberheadings' );
221  function getTidy() { return $this->mTidy; }
228  function getMaxTemplateDepth() { return $this->mMaxTemplateDepth; }
229  /* @since 1.20 */
238  function getThumbSize() { $this->optionUsed( 'thumbsize' );
240  function getStubThreshold() { $this->optionUsed( 'stubthreshold' );
241  return $this->mStubThreshold; }
242 
243  function getIsPreview() { return $this->mIsPreview; }
245  function getIsPrintable() { $this->optionUsed( 'printable' );
247  function getUser() { return $this->mUser; }
248  function getPreSaveTransform() { return $this->mPreSaveTransform; }
249 
250  function getDateFormat() {
251  $this->optionUsed( 'dateformat' );
252  if ( !isset( $this->mDateFormat ) ) {
253  $this->mDateFormat = $this->mUser->getDatePreference();
254  }
255  return $this->mDateFormat;
256  }
257 
258  function getTimestamp() {
259  if ( !isset( $this->mTimestamp ) ) {
260  $this->mTimestamp = wfTimestampNow();
261  }
262  return $this->mTimestamp;
263  }
264 
281  function getUserLangObj() {
282  $this->optionUsed( 'userlang' );
283  return $this->mUserLang;
284  }
285 
292  function getUserLang() {
293  return $this->getUserLangObj()->getCode();
294  }
295 
296  function setInterwikiMagic( $x ) { return wfSetVar( $this->mInterwikiMagic, $x ); }
297  function setAllowExternalImages( $x ) { return wfSetVar( $this->mAllowExternalImages, $x ); }
298  function setAllowExternalImagesFrom( $x ) { return wfSetVar( $this->mAllowExternalImagesFrom, $x ); }
299  function setEnableImageWhitelist( $x ) { return wfSetVar( $this->mEnableImageWhitelist, $x ); }
300  function setDateFormat( $x ) { return wfSetVar( $this->mDateFormat, $x ); }
301  function setEditSection( $x ) { return wfSetVar( $this->mEditSection, $x ); }
302  function setNumberHeadings( $x ) { return wfSetVar( $this->mNumberHeadings, $x ); }
303  function setAllowSpecialInclusion( $x ) { return wfSetVar( $this->mAllowSpecialInclusion, $x ); }
304  function setTidy( $x ) { return wfSetVar( $this->mTidy, $x ); }
305 
307  function setSkin( $x ) { wfDeprecated( __METHOD__, '1.19' ); }
308  function setInterfaceMessage( $x ) { return wfSetVar( $this->mInterfaceMessage, $x ); }
309  function setTargetLanguage( $x ) { return wfSetVar( $this->mTargetLanguage, $x, true ); }
310  function setMaxIncludeSize( $x ) { return wfSetVar( $this->mMaxIncludeSize, $x ); }
311  function setMaxPPNodeCount( $x ) { return wfSetVar( $this->mMaxPPNodeCount, $x ); }
312  function setMaxGeneratedPPNodeCount( $x ) { return wfSetVar( $this->mMaxGeneratedPPNodeCount, $x ); }
313  function setMaxTemplateDepth( $x ) { return wfSetVar( $this->mMaxTemplateDepth, $x ); }
314  /* @since 1.20 */
315  function setExpensiveParserFunctionLimit( $x ) { return wfSetVar( $this->mExpensiveParserFunctionLimit, $x ); }
316  function setRemoveComments( $x ) { return wfSetVar( $this->mRemoveComments, $x ); }
317  function setTemplateCallback( $x ) { return wfSetVar( $this->mTemplateCallback, $x ); }
318  function enableLimitReport( $x = true ) { return wfSetVar( $this->mEnableLimitReport, $x ); }
319  function setTimestamp( $x ) { return wfSetVar( $this->mTimestamp, $x ); }
320  function setCleanSignatures( $x ) { return wfSetVar( $this->mCleanSignatures, $x ); }
321  function setExternalLinkTarget( $x ) { return wfSetVar( $this->mExternalLinkTarget, $x ); }
322  function disableContentConversion( $x = true ) { return wfSetVar( $this->mDisableContentConversion, $x ); }
323  function disableTitleConversion( $x = true ) { return wfSetVar( $this->mDisableTitleConversion, $x ); }
324  function setUserLang( $x ) {
325  if ( is_string( $x ) ) {
326  $x = Language::factory( $x );
327  }
328  return wfSetVar( $this->mUserLang, $x );
329  }
330  function setThumbSize( $x ) { return wfSetVar( $this->mThumbSize, $x ); }
331  function setStubThreshold( $x ) { return wfSetVar( $this->mStubThreshold, $x ); }
332  function setPreSaveTransform( $x ) { return wfSetVar( $this->mPreSaveTransform, $x ); }
333 
334  function setIsPreview( $x ) { return wfSetVar( $this->mIsPreview, $x ); }
335  function setIsSectionPreview( $x ) { return wfSetVar( $this->mIsSectionPreview, $x ); }
336  function setIsPrintable( $x ) { return wfSetVar( $this->mIsPrintable, $x ); }
337 
341  function addExtraKey( $key ) {
342  $this->mExtraKey .= '!' . $key;
343  }
344 
350  function __construct( $user = null, $lang = null ) {
351  if ( $user === null ) {
352  global $wgUser;
353  if ( $wgUser === null ) {
354  $user = new User;
355  } else {
356  $user = $wgUser;
357  }
358  }
359  if ( $lang === null ) {
360  global $wgLang;
361  if ( !StubObject::isRealObject( $wgLang ) ) {
362  $wgLang->_unstub();
363  }
364  $lang = $wgLang;
365  }
366  $this->initialiseFromUser( $user, $lang );
367  }
368 
376  public static function newFromUser( $user ) {
377  return new ParserOptions( $user );
378  }
379 
387  public static function newFromUserAndLang( User $user, Language $lang ) {
388  return new ParserOptions( $user, $lang );
389  }
390 
397  public static function newFromContext( IContextSource $context ) {
398  return new ParserOptions( $context->getUser(), $context->getLanguage() );
399  }
400 
407  private function initialiseFromUser( $user, $lang ) {
408  global $wgInterwikiMagic, $wgAllowExternalImages,
409  $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion,
410  $wgMaxArticleSize, $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth,
411  $wgCleanSignatures, $wgExternalLinkTarget, $wgExpensiveParserFunctionLimit,
412  $wgMaxGeneratedPPNodeCount, $wgDisableLangConversion, $wgDisableTitleConversion;
413 
414  wfProfileIn( __METHOD__ );
415 
416  $this->mInterwikiMagic = $wgInterwikiMagic;
417  $this->mAllowExternalImages = $wgAllowExternalImages;
418  $this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom;
419  $this->mEnableImageWhitelist = $wgEnableImageWhitelist;
420  $this->mAllowSpecialInclusion = $wgAllowSpecialInclusion;
421  $this->mMaxIncludeSize = $wgMaxArticleSize * 1024;
422  $this->mMaxPPNodeCount = $wgMaxPPNodeCount;
423  $this->mMaxGeneratedPPNodeCount = $wgMaxGeneratedPPNodeCount;
424  $this->mMaxPPExpandDepth = $wgMaxPPExpandDepth;
425  $this->mMaxTemplateDepth = $wgMaxTemplateDepth;
426  $this->mExpensiveParserFunctionLimit = $wgExpensiveParserFunctionLimit;
427  $this->mCleanSignatures = $wgCleanSignatures;
428  $this->mExternalLinkTarget = $wgExternalLinkTarget;
429  $this->mDisableContentConversion = $wgDisableLangConversion;
430  $this->mDisableTitleConversion = $wgDisableLangConversion || $wgDisableTitleConversion;
431 
432  $this->mUser = $user;
433  $this->mNumberHeadings = $user->getOption( 'numberheadings' );
434  $this->mThumbSize = $user->getOption( 'thumbsize' );
435  $this->mStubThreshold = $user->getStubThreshold();
436  $this->mUserLang = $lang;
437 
438  wfProfileOut( __METHOD__ );
439  }
440 
445  function registerWatcher( $callback ) {
446  $this->onAccessCallback = $callback;
447  }
448 
453  public function optionUsed( $optionName ) {
454  if ( $this->onAccessCallback ) {
455  call_user_func( $this->onAccessCallback, $optionName );
456  }
457  }
458 
465  public static function legacyOptions() {
466  return array( 'stubthreshold', 'numberheadings', 'userlang', 'thumbsize', 'editsection', 'printable' );
467  }
468 
485  public function optionsHash( $forOptions, $title = null ) {
486  global $wgRenderHashAppend;
487 
488  // FIXME: Once the cache key is reorganized this argument
489  // can be dropped. It was used when the math extension was
490  // part of core.
491  $confstr = '*';
492 
493  // Space assigned for the stubthreshold but unused
494  // since it disables the parser cache, its value will always
495  // be 0 when this function is called by parsercache.
496  if ( in_array( 'stubthreshold', $forOptions ) ) {
497  $confstr .= '!' . $this->mStubThreshold;
498  } else {
499  $confstr .= '!*';
500  }
501 
502  if ( in_array( 'dateformat', $forOptions ) ) {
503  $confstr .= '!' . $this->getDateFormat();
504  }
505 
506  if ( in_array( 'numberheadings', $forOptions ) ) {
507  $confstr .= '!' . ( $this->mNumberHeadings ? '1' : '' );
508  } else {
509  $confstr .= '!*';
510  }
511 
512  if ( in_array( 'userlang', $forOptions ) ) {
513  $confstr .= '!' . $this->mUserLang->getCode();
514  } else {
515  $confstr .= '!*';
516  }
517 
518  if ( in_array( 'thumbsize', $forOptions ) ) {
519  $confstr .= '!' . $this->mThumbSize;
520  } else {
521  $confstr .= '!*';
522  }
523 
524  // add in language specific options, if any
525  // @todo FIXME: This is just a way of retrieving the url/user preferred variant
526  if ( !is_null( $title ) ) {
527  $confstr .= $title->getPageLanguage()->getExtraHashOptions();
528  } else {
530  $confstr .= $wgContLang->getExtraHashOptions();
531  }
532 
533  $confstr .= $wgRenderHashAppend;
534 
535  if ( !in_array( 'editsection', $forOptions ) ) {
536  $confstr .= '!*';
537  } elseif ( !$this->mEditSection ) {
538  $confstr .= '!edit=0';
539  }
540 
541  if ( $this->mIsPrintable && in_array( 'printable', $forOptions ) ) {
542  $confstr .= '!printable=1';
543  }
544 
545  if ( $this->mExtraKey != '' ) {
546  $confstr .= $this->mExtraKey;
547  }
548 
549  // Give a chance for extensions to modify the hash, if they have
550  // extra options or other effects on the parser cache.
551  wfRunHooks( 'PageRenderingHash', array( &$confstr, $this->getUser(), &$forOptions ) );
552 
553  // Make it a valid memcached key fragment
554  $confstr = str_replace( ' ', '_', $confstr );
555 
556  return $confstr;
557  }
558 }
ParserOptions\$onAccessCallback
$onAccessCallback
Function to be called when an option is accessed.
Definition: ParserOptions.php:210
ParserOptions\setMaxIncludeSize
setMaxIncludeSize( $x)
Definition: ParserOptions.php:309
ParserOptions
Set options of the Parser.
Definition: ParserOptions.php:31
ParserOptions\getAllowExternalImagesFrom
getAllowExternalImagesFrom()
Definition: ParserOptions.php:214
$wgUser
$wgUser
Definition: Setup.php:572
ParserOptions\getExpensiveParserFunctionLimit
getExpensiveParserFunctionLimit()
Definition: ParserOptions.php:229
ParserOptions\$mMaxTemplateDepth
$mMaxTemplateDepth
Maximum recursion depth for templates within templates.
Definition: ParserOptions.php:106
ParserOptions\setTidy
setTidy( $x)
Definition: ParserOptions.php:303
ParserOptions\getIsSectionPreview
getIsSectionPreview()
Definition: ParserOptions.php:243
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ParserOptions\getRemoveComments
getRemoveComments()
Definition: ParserOptions.php:230
ParserOptions\disableContentConversion
disableContentConversion( $x=true)
Definition: ParserOptions.php:321
ParserOptions\$mStubThreshold
$mStubThreshold
Maximum article size of an article to be marked as "stub".
Definition: ParserOptions.php:175
ParserOptions\initialiseFromUser
initialiseFromUser( $user, $lang)
Get user options.
Definition: ParserOptions.php:406
wfSetVar
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...
Definition: GlobalFunctions.php:2186
ParserOptions\$mTargetLanguage
$mTargetLanguage
Overrides $mInterfaceMessage with arbitrary language.
Definition: ParserOptions.php:81
ParserOptions\getIsPreview
getIsPreview()
Definition: ParserOptions.php:242
ParserOptions\getDisableTitleConversion
getDisableTitleConversion()
Definition: ParserOptions.php:236
ParserOptions\setAllowExternalImages
setAllowExternalImages( $x)
Definition: ParserOptions.php:296
ParserOptions\setTemplateCallback
setTemplateCallback( $x)
Definition: ParserOptions.php:316
ParserOptions\setIsPreview
setIsPreview( $x)
Definition: ParserOptions.php:333
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
ParserOptions\setTargetLanguage
setTargetLanguage( $x)
Definition: ParserOptions.php:308
ParserOptions\$mMaxPPExpandDepth
$mMaxPPExpandDepth
Maximum recursion depth in PPFrame::expand()
Definition: ParserOptions.php:101
ParserOptions\$mRemoveComments
$mRemoveComments
Remove HTML comments.
Definition: ParserOptions.php:116
ParserOptions\getInterfaceMessage
getInterfaceMessage()
Definition: ParserOptions.php:221
ParserOptions\setIsSectionPreview
setIsSectionPreview( $x)
Definition: ParserOptions.php:334
ParserOptions\setEnableImageWhitelist
setEnableImageWhitelist( $x)
Definition: ParserOptions.php:298
ParserOptions\$mMaxGeneratedPPNodeCount
$mMaxGeneratedPPNodeCount
Maximum number of nodes generated by Preprocessor::preprocessToObj()
Definition: ParserOptions.php:96
ParserOptions\$mIsPrintable
$mIsPrintable
Parsing the printable version of the page?
Definition: ParserOptions.php:200
ParserOptions\disableTitleConversion
disableTitleConversion( $x=true)
Definition: ParserOptions.php:322
ParserOptions\getIsPrintable
getIsPrintable()
Definition: ParserOptions.php:244
ParserOptions\setMaxGeneratedPPNodeCount
setMaxGeneratedPPNodeCount( $x)
Definition: ParserOptions.php:311
$wgContLang
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 content language as $wgContLang
Definition: design.txt:56
ParserOptions\setMaxTemplateDepth
setMaxTemplateDepth( $x)
Definition: ParserOptions.php:312
ParserOptions\getUserLangObj
getUserLangObj()
Get the user language used by the parser for this page.
Definition: ParserOptions.php:280
ParserOptions\$mPreSaveTransform
$mPreSaveTransform
Transform wiki markup when saving the page?
Definition: ParserOptions.php:150
ParserOptions\registerWatcher
registerWatcher( $callback)
Registers a callback for tracking which ParserOptions which are used.
Definition: ParserOptions.php:444
ParserOptions\getDateFormat
getDateFormat()
Definition: ParserOptions.php:249
ParserOptions\$mInterfaceMessage
$mInterfaceMessage
Which lang to call for PLURAL and GRAMMAR.
Definition: ParserOptions.php:76
ParserOptions\$mExpensiveParserFunctionLimit
$mExpensiveParserFunctionLimit
Maximum number of calls per parse to expensive parser functions.
Definition: ParserOptions.php:111
ParserOptions\$mAllowExternalImages
$mAllowExternalImages
Allow external images inline?
Definition: ParserOptions.php:41
ParserOptions\$mAllowSpecialInclusion
$mAllowSpecialInclusion
Allow inclusion of special pages?
Definition: ParserOptions.php:66
ParserOptions\setNumberHeadings
setNumberHeadings( $x)
Definition: ParserOptions.php:301
ParserOptions\$mTidy
$mTidy
Use tidy to cleanup output HTML?
Definition: ParserOptions.php:71
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Definition: GlobalFunctions.php:1174
ParserOptions\newFromUserAndLang
static newFromUserAndLang(User $user, Language $lang)
Get a ParserOptions object from a given user and language.
Definition: ParserOptions.php:386
ParserOptions\setUserLang
setUserLang( $x)
Definition: ParserOptions.php:323
ParserOptions\getAllowSpecialInclusion
getAllowSpecialInclusion()
Definition: ParserOptions.php:219
ParserOptions\getTidy
getTidy()
Definition: ParserOptions.php:220
ParserOptions\getMaxIncludeSize
getMaxIncludeSize()
Definition: ParserOptions.php:223
ParserOptions\$mUserLang
$mUserLang
Language object of the User language.
Definition: ParserOptions.php:180
ParserOptions\$mDisableTitleConversion
$mDisableTitleConversion
Whether title conversion should be disabled.
Definition: ParserOptions.php:160
ParserOptions\$mIsSectionPreview
$mIsSectionPreview
Parsing the page for a "preview" operation on a single section?
Definition: ParserOptions.php:195
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
ParserOptions\setSkin
setSkin( $x)
Definition: ParserOptions.php:306
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4066
ParserOptions\setThumbSize
setThumbSize( $x)
Definition: ParserOptions.php:329
ParserOptions\getEnableImageWhitelist
getEnableImageWhitelist()
Definition: ParserOptions.php:215
ParserOptions\setExternalLinkTarget
setExternalLinkTarget( $x)
Definition: ParserOptions.php:320
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
ParserOptions\setDateFormat
setDateFormat( $x)
Definition: ParserOptions.php:299
ParserOptions\getTargetLanguage
getTargetLanguage()
Definition: ParserOptions.php:222
ParserOptions\setAllowSpecialInclusion
setAllowSpecialInclusion( $x)
Definition: ParserOptions.php:302
ParserOptions\getExternalLinkTarget
getExternalLinkTarget()
Definition: ParserOptions.php:234
ParserOptions\$mDateFormat
$mDateFormat
Date format index.
Definition: ParserOptions.php:56
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
wfTimestampNow
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Definition: GlobalFunctions.php:2561
ParserOptions\getStubThreshold
getStubThreshold()
Definition: ParserOptions.php:239
ParserOptions\getUserLang
getUserLang()
Same as getUserLangObj() but returns a string instead.
Definition: ParserOptions.php:291
ParserOptions\getPreSaveTransform
getPreSaveTransform()
Definition: ParserOptions.php:247
ParserOptions\setStubThreshold
setStubThreshold( $x)
Definition: ParserOptions.php:330
ParserOptions\$mDisableContentConversion
$mDisableContentConversion
Whether content conversion should be disabled.
Definition: ParserOptions.php:155
ParserOptions\$mExtraKey
$mExtraKey
Extra key that should be present in the caching key.
Definition: ParserOptions.php:205
ParserOptions\$mAllowExternalImagesFrom
$mAllowExternalImagesFrom
If not, any exception?
Definition: ParserOptions.php:46
ParserOptions\getDisableContentConversion
getDisableContentConversion()
Definition: ParserOptions.php:235
ParserOptions\optionUsed
optionUsed( $optionName)
Called when an option is accessed.
Definition: ParserOptions.php:452
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
ParserOptions\$mInterwikiMagic
$mInterwikiMagic
Interlanguage links are removed and returned in an array.
Definition: ParserOptions.php:36
ParserOptions\setTimestamp
setTimestamp( $x)
Definition: ParserOptions.php:318
ParserOptions\$mEnableImageWhitelist
$mEnableImageWhitelist
If not or it doesn't match, should we check an on-wiki whitelist?
Definition: ParserOptions.php:51
ParserOptions\setCleanSignatures
setCleanSignatures( $x)
Definition: ParserOptions.php:319
ParserOptions\newFromContext
static newFromContext(IContextSource $context)
Get a ParserOptions object from a IContextSource object.
Definition: ParserOptions.php:396
ParserOptions\$mMaxIncludeSize
$mMaxIncludeSize
Maximum size of template expansions, in bytes.
Definition: ParserOptions.php:86
ParserOptions\$mMaxPPNodeCount
$mMaxPPNodeCount
Maximum number of nodes touched by PPFrame::expand()
Definition: ParserOptions.php:91
ParserOptions\getTemplateCallback
getTemplateCallback()
Definition: ParserOptions.php:231
ParserOptions\$mTimestamp
$mTimestamp
Timestamp used for {{CURRENTDAY}} etc.
Definition: ParserOptions.php:132
ParserOptions\setRemoveComments
setRemoveComments( $x)
Definition: ParserOptions.php:315
ParserOptions\setInterwikiMagic
setInterwikiMagic( $x)
Definition: ParserOptions.php:295
ParserOptions\$mNumberHeadings
$mNumberHeadings
Automatically number headings?
Definition: ParserOptions.php:165
IContextSource\getUser
getUser()
Get the User object.
ParserOptions\setExpensiveParserFunctionLimit
setExpensiveParserFunctionLimit( $x)
Definition: ParserOptions.php:314
ParserOptions\getTimestamp
getTimestamp()
Definition: ParserOptions.php:257
ParserOptions\$mEditSection
$mEditSection
Create "edit section" links?
Definition: ParserOptions.php:61
ParserOptions\setMaxPPNodeCount
setMaxPPNodeCount( $x)
Definition: ParserOptions.php:310
ParserOptions\$mExternalLinkTarget
$mExternalLinkTarget
Target attribute for external links.
Definition: ParserOptions.php:137
$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 account $user
Definition: hooks.txt:237
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
ParserOptions\getCleanSignatures
getCleanSignatures()
Definition: ParserOptions.php:233
ParserOptions\setAllowExternalImagesFrom
setAllowExternalImagesFrom( $x)
Definition: ParserOptions.php:297
ParserOptions\enableLimitReport
enableLimitReport( $x=true)
Definition: ParserOptions.php:317
$wgLang
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
ParserOptions\__construct
__construct( $user=null, $lang=null)
Constructor.
Definition: ParserOptions.php:349
ParserOptions\getInterwikiMagic
getInterwikiMagic()
Definition: ParserOptions.php:212
ParserOptions\$mUser
User $mUser
Stored user object.
Definition: ParserOptions.php:185
ParserOptions\setInterfaceMessage
setInterfaceMessage( $x)
Definition: ParserOptions.php:307
ParserOptions\getUser
getUser()
Definition: ParserOptions.php:246
ParserOptions\$mIsPreview
$mIsPreview
Parsing the page for a "preview" operation?
Definition: ParserOptions.php:190
ParserOptions\getThumbSize
getThumbSize()
Definition: ParserOptions.php:237
StubObject\isRealObject
static isRealObject( $obj)
Returns a bool value whenever $obj is a stub object.
Definition: StubObject.php:68
ParserOptions\setIsPrintable
setIsPrintable( $x)
Definition: ParserOptions.php:335
ParserOptions\getMaxPPNodeCount
getMaxPPNodeCount()
Definition: ParserOptions.php:224
ParserOptions\legacyOptions
static legacyOptions()
Returns the full array of options that would have been used by in 1.16.
Definition: ParserOptions.php:464
User
User
Definition: All_system_messages.txt:425
ParserOptions\setEditSection
setEditSection( $x)
Definition: ParserOptions.php:300
Language\factory
static factory( $code)
Get a cached or new language object for a given language code.
Definition: Language.php:184
ParserOptions\getMaxGeneratedPPNodeCount
getMaxGeneratedPPNodeCount()
Definition: ParserOptions.php:225
ParserOptions\getMaxPPExpandDepth
getMaxPPExpandDepth()
Definition: ParserOptions.php:226
ParserOptions\getEnableLimitReport
getEnableLimitReport()
Definition: ParserOptions.php:232
ParserOptions\getNumberHeadings
getNumberHeadings()
Definition: ParserOptions.php:217
ParserOptions\getMaxTemplateDepth
getMaxTemplateDepth()
Definition: ParserOptions.php:227
ParserOptions\setPreSaveTransform
setPreSaveTransform( $x)
Definition: ParserOptions.php:331
ParserOptions\getEditSection
getEditSection()
Definition: ParserOptions.php:216
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:59
ParserOptions\$mCleanSignatures
$mCleanSignatures
Clean up signature texts?
Definition: ParserOptions.php:145
ParserOptions\$mEnableLimitReport
$mEnableLimitReport
Enable limit report in an HTML comment on output.
Definition: ParserOptions.php:127
Language
Internationalisation code.
Definition: Language.php:74
ParserOptions\optionsHash
optionsHash( $forOptions, $title=null)
Generate a hash string with the values set on these ParserOptions for the keys given in the array.
Definition: ParserOptions.php:484
ParserOptions\$mThumbSize
$mThumbSize
Thumb size preferred by the user.
Definition: ParserOptions.php:170
IContextSource\getLanguage
getLanguage()
Get the Language object.
ParserOptions\getAllowExternalImages
getAllowExternalImages()
Definition: ParserOptions.php:213
ParserOptions\newFromUser
static newFromUser( $user)
Get a ParserOptions object from a given user.
Definition: ParserOptions.php:375
ParserOptions\addExtraKey
addExtraKey( $key)
Extra key that should be present in the parser cache key.
Definition: ParserOptions.php:340
ParserOptions\$mTemplateCallback
$mTemplateCallback
Callback for template fetching.
Definition: ParserOptions.php:121