Merge "resourceloader: Pass a Config to the ResourceLoader constructor"
[lhc/web/wiklou.git] / includes / parser / ParserOptions.php
index 411702f..2ca9d50 100644 (file)
@@ -34,108 +34,108 @@ class ParserOptions {
        /**
         * Interlanguage links are removed and returned in an array
         */
-       var $mInterwikiMagic;
+       public $mInterwikiMagic;
 
        /**
         * Allow external images inline?
         */
-       var $mAllowExternalImages;
+       public $mAllowExternalImages;
 
        /**
         * If not, any exception?
         */
-       var $mAllowExternalImagesFrom;
+       public $mAllowExternalImagesFrom;
 
        /**
         * If not or it doesn't match, should we check an on-wiki whitelist?
         */
-       var $mEnableImageWhitelist;
+       public $mEnableImageWhitelist;
 
        /**
         * Date format index
         */
-       var $mDateFormat = null;
+       public $mDateFormat = null;
 
        /**
         * Create "edit section" links?
         */
-       var $mEditSection = true;
+       public $mEditSection = true;
 
        /**
         * Allow inclusion of special pages?
         */
-       var $mAllowSpecialInclusion;
+       public $mAllowSpecialInclusion;
 
        /**
         * Use tidy to cleanup output HTML?
         */
-       var $mTidy = false;
+       public $mTidy = false;
 
        /**
         * Which lang to call for PLURAL and GRAMMAR
         */
-       var $mInterfaceMessage = false;
+       public $mInterfaceMessage = false;
 
        /**
         * Overrides $mInterfaceMessage with arbitrary language
         */
-       var $mTargetLanguage = null;
+       public $mTargetLanguage = null;
 
        /**
         * Maximum size of template expansions, in bytes
         */
-       var $mMaxIncludeSize;
+       public $mMaxIncludeSize;
 
        /**
         * Maximum number of nodes touched by PPFrame::expand()
         */
-       var $mMaxPPNodeCount;
+       public $mMaxPPNodeCount;
 
        /**
         * Maximum number of nodes generated by Preprocessor::preprocessToObj()
         */
-       var $mMaxGeneratedPPNodeCount;
+       public $mMaxGeneratedPPNodeCount;
 
        /**
         * Maximum recursion depth in PPFrame::expand()
         */
-       var $mMaxPPExpandDepth;
+       public $mMaxPPExpandDepth;
 
        /**
         * Maximum recursion depth for templates within templates
         */
-       var $mMaxTemplateDepth;
+       public $mMaxTemplateDepth;
 
        /**
         * Maximum number of calls per parse to expensive parser functions
         */
-       var $mExpensiveParserFunctionLimit;
+       public $mExpensiveParserFunctionLimit;
 
        /**
         * Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
         */
-       var $mRemoveComments = true;
+       public $mRemoveComments = true;
 
        /**
         * Callback for template fetching. Used as first argument to call_user_func().
         */
-       var $mTemplateCallback =
+       public $mTemplateCallback =
                array( 'Parser', 'statelessFetchTemplate' );
 
        /**
         * Enable limit report in an HTML comment on output
         */
-       var $mEnableLimitReport = false;
+       public $mEnableLimitReport = false;
 
        /**
         * Timestamp used for {{CURRENTDAY}} etc.
         */
-       var $mTimestamp;
+       public $mTimestamp;
 
        /**
         * Target attribute for external links
         */
-       var $mExternalLinkTarget;
+       public $mExternalLinkTarget;
 
        /**
         * Clean up signature texts?
@@ -143,32 +143,32 @@ class ParserOptions {
         * 1) Strip ~~~, ~~~~ and ~~~~~ out of signatures
         * 2) Substitute all transclusions
         */
-       var $mCleanSignatures;
+       public $mCleanSignatures;
 
        /**
         * Transform wiki markup when saving the page?
         */
-       var $mPreSaveTransform = true;
+       public $mPreSaveTransform = true;
 
        /**
         * Whether content conversion should be disabled
         */
-       var $mDisableContentConversion;
+       public $mDisableContentConversion;
 
        /**
         * Whether title conversion should be disabled
         */
-       var $mDisableTitleConversion;
+       public $mDisableTitleConversion;
 
        /**
         * Automatically number headings?
         */
-       var $mNumberHeadings;
+       public $mNumberHeadings;
 
        /**
         * Thumb size preferred by the user.
         */
-       var $mThumbSize;
+       public $mThumbSize;
 
        /**
         * Maximum article size of an article to be marked as "stub"
@@ -178,169 +178,169 @@ class ParserOptions {
        /**
         * Language object of the User language.
         */
-       var $mUserLang;
+       public $mUserLang;
 
        /**
         * @var User
         * Stored user object
         */
-       var $mUser;
+       public $mUser;
 
        /**
         * Parsing the page for a "preview" operation?
         */
-       var $mIsPreview = false;
+       public $mIsPreview = false;
 
        /**
         * Parsing the page for a "preview" operation on a single section?
         */
-       var $mIsSectionPreview = false;
+       public $mIsSectionPreview = false;
 
        /**
         * Parsing the printable version of the page?
         */
-       var $mIsPrintable = false;
+       public $mIsPrintable = false;
 
        /**
         * Extra key that should be present in the caching key.
         */
-       var $mExtraKey = '';
+       public $mExtraKey = '';
 
        /**
         * Function to be called when an option is accessed.
         */
        protected $onAccessCallback = null;
 
-       function getInterwikiMagic() {
+       public function getInterwikiMagic() {
                return $this->mInterwikiMagic;
        }
 
-       function getAllowExternalImages() {
+       public function getAllowExternalImages() {
                return $this->mAllowExternalImages;
        }
 
-       function getAllowExternalImagesFrom() {
+       public function getAllowExternalImagesFrom() {
                return $this->mAllowExternalImagesFrom;
        }
 
-       function getEnableImageWhitelist() {
+       public function getEnableImageWhitelist() {
                return $this->mEnableImageWhitelist;
        }
 
-       function getEditSection() {
+       public function getEditSection() {
                return $this->mEditSection;
        }
 
-       function getNumberHeadings() {
+       public function getNumberHeadings() {
                $this->optionUsed( 'numberheadings' );
 
                return $this->mNumberHeadings;
        }
 
-       function getAllowSpecialInclusion() {
+       public function getAllowSpecialInclusion() {
                return $this->mAllowSpecialInclusion;
        }
 
-       function getTidy() {
+       public function getTidy() {
                return $this->mTidy;
        }
 
-       function getInterfaceMessage() {
+       public function getInterfaceMessage() {
                return $this->mInterfaceMessage;
        }
 
-       function getTargetLanguage() {
+       public function getTargetLanguage() {
                return $this->mTargetLanguage;
        }
 
-       function getMaxIncludeSize() {
+       public function getMaxIncludeSize() {
                return $this->mMaxIncludeSize;
        }
 
-       function getMaxPPNodeCount() {
+       public function getMaxPPNodeCount() {
                return $this->mMaxPPNodeCount;
        }
 
-       function getMaxGeneratedPPNodeCount() {
+       public function getMaxGeneratedPPNodeCount() {
                return $this->mMaxGeneratedPPNodeCount;
        }
 
-       function getMaxPPExpandDepth() {
+       public function getMaxPPExpandDepth() {
                return $this->mMaxPPExpandDepth;
        }
 
-       function getMaxTemplateDepth() {
+       public function getMaxTemplateDepth() {
                return $this->mMaxTemplateDepth;
        }
 
        /* @since 1.20 */
-       function getExpensiveParserFunctionLimit() {
+       public function getExpensiveParserFunctionLimit() {
                return $this->mExpensiveParserFunctionLimit;
        }
 
-       function getRemoveComments() {
+       public function getRemoveComments() {
                return $this->mRemoveComments;
        }
 
-       function getTemplateCallback() {
+       public function getTemplateCallback() {
                return $this->mTemplateCallback;
        }
 
-       function getEnableLimitReport() {
+       public function getEnableLimitReport() {
                return $this->mEnableLimitReport;
        }
 
-       function getCleanSignatures() {
+       public function getCleanSignatures() {
                return $this->mCleanSignatures;
        }
 
-       function getExternalLinkTarget() {
+       public function getExternalLinkTarget() {
                return $this->mExternalLinkTarget;
        }
 
-       function getDisableContentConversion() {
+       public function getDisableContentConversion() {
                return $this->mDisableContentConversion;
        }
 
-       function getDisableTitleConversion() {
+       public function getDisableTitleConversion() {
                return $this->mDisableTitleConversion;
        }
 
-       function getThumbSize() {
+       public function getThumbSize() {
                $this->optionUsed( 'thumbsize' );
 
                return $this->mThumbSize;
        }
 
-       function getStubThreshold() {
+       public function getStubThreshold() {
                $this->optionUsed( 'stubthreshold' );
 
                return $this->mStubThreshold;
        }
 
-       function getIsPreview() {
+       public function getIsPreview() {
                return $this->mIsPreview;
        }
 
-       function getIsSectionPreview() {
+       public function getIsSectionPreview() {
                return $this->mIsSectionPreview;
        }
 
-       function getIsPrintable() {
+       public function getIsPrintable() {
                $this->optionUsed( 'printable' );
 
                return $this->mIsPrintable;
        }
 
-       function getUser() {
+       public function getUser() {
                return $this->mUser;
        }
 
-       function getPreSaveTransform() {
+       public function getPreSaveTransform() {
                return $this->mPreSaveTransform;
        }
 
-       function getDateFormat() {
+       public function getDateFormat() {
                $this->optionUsed( 'dateformat' );
                if ( !isset( $this->mDateFormat ) ) {
                        $this->mDateFormat = $this->mUser->getDatePreference();
@@ -348,7 +348,7 @@ class ParserOptions {
                return $this->mDateFormat;
        }
 
-       function getTimestamp() {
+       public function getTimestamp() {
                if ( !isset( $this->mTimestamp ) ) {
                        $this->mTimestamp = wfTimestampNow();
                }
@@ -371,7 +371,7 @@ class ParserOptions {
         * @return Language
         * @since 1.19
         */
-       function getUserLangObj() {
+       public function getUserLangObj() {
                $this->optionUsed( 'userlang' );
                return $this->mUserLang;
        }
@@ -382,108 +382,108 @@ class ParserOptions {
         * @return string Language code
         * @since 1.17
         */
-       function getUserLang() {
+       public function getUserLang() {
                return $this->getUserLangObj()->getCode();
        }
 
-       function setInterwikiMagic( $x ) {
+       public function setInterwikiMagic( $x ) {
                return wfSetVar( $this->mInterwikiMagic, $x );
        }
 
-       function setAllowExternalImages( $x ) {
+       public function setAllowExternalImages( $x ) {
                return wfSetVar( $this->mAllowExternalImages, $x );
        }
 
-       function setAllowExternalImagesFrom( $x ) {
+       public function setAllowExternalImagesFrom( $x ) {
                return wfSetVar( $this->mAllowExternalImagesFrom, $x );
        }
 
-       function setEnableImageWhitelist( $x ) {
+       public function setEnableImageWhitelist( $x ) {
                return wfSetVar( $this->mEnableImageWhitelist, $x );
        }
 
-       function setDateFormat( $x ) {
+       public function setDateFormat( $x ) {
                return wfSetVar( $this->mDateFormat, $x );
        }
 
-       function setEditSection( $x ) {
+       public function setEditSection( $x ) {
                return wfSetVar( $this->mEditSection, $x );
        }
 
-       function setNumberHeadings( $x ) {
+       public function setNumberHeadings( $x ) {
                return wfSetVar( $this->mNumberHeadings, $x );
        }
 
-       function setAllowSpecialInclusion( $x ) {
+       public function setAllowSpecialInclusion( $x ) {
                return wfSetVar( $this->mAllowSpecialInclusion, $x );
        }
 
-       function setTidy( $x ) {
+       public function setTidy( $x ) {
                return wfSetVar( $this->mTidy, $x );
        }
 
-       function setInterfaceMessage( $x ) {
+       public function setInterfaceMessage( $x ) {
                return wfSetVar( $this->mInterfaceMessage, $x );
        }
 
-       function setTargetLanguage( $x ) {
+       public function setTargetLanguage( $x ) {
                return wfSetVar( $this->mTargetLanguage, $x, true );
        }
 
-       function setMaxIncludeSize( $x ) {
+       public function setMaxIncludeSize( $x ) {
                return wfSetVar( $this->mMaxIncludeSize, $x );
        }
 
-       function setMaxPPNodeCount( $x ) {
+       public function setMaxPPNodeCount( $x ) {
                return wfSetVar( $this->mMaxPPNodeCount, $x );
        }
 
-       function setMaxGeneratedPPNodeCount( $x ) {
+       public function setMaxGeneratedPPNodeCount( $x ) {
                return wfSetVar( $this->mMaxGeneratedPPNodeCount, $x );
        }
 
-       function setMaxTemplateDepth( $x ) {
+       public function setMaxTemplateDepth( $x ) {
                return wfSetVar( $this->mMaxTemplateDepth, $x );
        }
 
        /* @since 1.20 */
-       function setExpensiveParserFunctionLimit( $x ) {
+       public function setExpensiveParserFunctionLimit( $x ) {
                return wfSetVar( $this->mExpensiveParserFunctionLimit, $x );
        }
 
-       function setRemoveComments( $x ) {
+       public function setRemoveComments( $x ) {
                return wfSetVar( $this->mRemoveComments, $x );
        }
 
-       function setTemplateCallback( $x ) {
+       public function setTemplateCallback( $x ) {
                return wfSetVar( $this->mTemplateCallback, $x );
        }
 
-       function enableLimitReport( $x = true ) {
+       public function enableLimitReport( $x = true ) {
                return wfSetVar( $this->mEnableLimitReport, $x );
        }
 
-       function setTimestamp( $x ) {
+       public function setTimestamp( $x ) {
                return wfSetVar( $this->mTimestamp, $x );
        }
 
-       function setCleanSignatures( $x ) {
+       public function setCleanSignatures( $x ) {
                return wfSetVar( $this->mCleanSignatures, $x );
        }
 
-       function setExternalLinkTarget( $x ) {
+       public function setExternalLinkTarget( $x ) {
                return wfSetVar( $this->mExternalLinkTarget, $x );
        }
 
-       function disableContentConversion( $x = true ) {
+       public function disableContentConversion( $x = true ) {
                return wfSetVar( $this->mDisableContentConversion, $x );
        }
 
-       function disableTitleConversion( $x = true ) {
+       public function disableTitleConversion( $x = true ) {
                return wfSetVar( $this->mDisableTitleConversion, $x );
        }
 
-       function setUserLang( $x ) {
+       public function setUserLang( $x ) {
                if ( is_string( $x ) ) {
                        $x = Language::factory( $x );
                }
@@ -491,34 +491,35 @@ class ParserOptions {
                return wfSetVar( $this->mUserLang, $x );
        }
 
-       function setThumbSize( $x ) {
+       public function setThumbSize( $x ) {
                return wfSetVar( $this->mThumbSize, $x );
        }
 
-       function setStubThreshold( $x ) {
+       public function setStubThreshold( $x ) {
                return wfSetVar( $this->mStubThreshold, $x );
        }
 
-       function setPreSaveTransform( $x ) {
+       public function setPreSaveTransform( $x ) {
                return wfSetVar( $this->mPreSaveTransform, $x );
        }
 
-       function setIsPreview( $x ) {
+       public function setIsPreview( $x ) {
                return wfSetVar( $this->mIsPreview, $x );
        }
 
-       function setIsSectionPreview( $x ) {
+       public function setIsSectionPreview( $x ) {
                return wfSetVar( $this->mIsSectionPreview, $x );
        }
 
-       function setIsPrintable( $x ) {
+       public function setIsPrintable( $x ) {
                return wfSetVar( $this->mIsPrintable, $x );
        }
 
        /**
         * Extra key that should be present in the parser cache key.
+        * @param string $key
         */
-       function addExtraKey( $key ) {
+       public function addExtraKey( $key ) {
                $this->mExtraKey .= '!' . $key;
        }
 
@@ -527,7 +528,7 @@ class ParserOptions {
         * @param User $user
         * @param Language $lang
         */
-       function __construct( $user = null, $lang = null ) {
+       public function __construct( $user = null, $lang = null ) {
                if ( $user === null ) {
                        global $wgUser;
                        if ( $wgUser === null ) {
@@ -623,7 +624,7 @@ class ParserOptions {
         * This is a private API with the parser.
         * @param callable $callback
         */
-       function registerWatcher( $callback ) {
+       public function registerWatcher( $callback ) {
                $this->onAccessCallback = $callback;
        }