Merge "Fix "succesful" typo"
[lhc/web/wiklou.git] / includes / parser / ParserOutput.php
index f80e6bf..ab7348f 100644 (file)
@@ -42,7 +42,7 @@ class ParserOutput extends CacheTime {
        public $mLanguageLinks;
 
        /**
-        * @var array $mCategoriesMap of category names to sort keys
+        * @var array $mCategories Map of category names to sort keys
         */
        public $mCategories;
 
@@ -498,6 +498,7 @@ class ParserOutput extends CacheTime {
        public function setNoGallery( $value ) {
                $this->mNoGallery = (bool)$value;
        }
+
        public function getNoGallery() {
                return $this->mNoGallery;
        }
@@ -510,11 +511,6 @@ class ParserOutput extends CacheTime {
                return $this->mModules;
        }
 
-       public function getModuleScripts() {
-               wfDeprecated( __METHOD__, '1.33' );
-               return [];
-       }
-
        public function getModuleStyles() {
                return $this->mModuleStyles;
        }
@@ -633,12 +629,15 @@ class ParserOutput extends CacheTime {
        public function setNewSection( $value ) {
                $this->mNewSection = (bool)$value;
        }
+
        public function hideNewSection( $value ) {
                $this->mHideNewSection = (bool)$value;
        }
+
        public function getHideNewSection() {
                return (bool)$this->mHideNewSection;
        }
+
        public function getNewSection() {
                return (bool)$this->mNewSection;
        }
@@ -896,17 +895,30 @@ class ParserOutput extends CacheTime {
        }
 
        /**
-        * Fairly generic flag setter thingy.
+        * Attach a flag to the output so that it can be checked later to handle special cases
+        *
         * @param string $flag
         */
        public function setFlag( $flag ) {
                $this->mFlags[$flag] = true;
        }
 
+       /**
+        * @param string $flag
+        * @return bool Whether the given flag was set to signify a special case
+        */
        public function getFlag( $flag ) {
                return isset( $this->mFlags[$flag] );
        }
 
+       /**
+        * @return string[] List of flags signifying special cases
+        * @since 1.34
+        */
+       public function getAllFlags() {
+               return array_keys( $this->mFlags );
+       }
+
        /**
         * Set a property to be stored in the page_props database table.
         *