Merge "Add checkDependencies.php"
[lhc/web/wiklou.git] / includes / parser / ParserOutput.php
index ef22a1f..ab7348f 100644 (file)
@@ -895,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.
         *