Merge "Documentation for page_props getter in ParserOutput"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 4 Jun 2014 08:00:40 +0000 (08:00 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 4 Jun 2014 08:00:40 +0000 (08:00 +0000)
includes/parser/ParserOutput.php

index 931c088..b4a1c5d 100644 (file)
@@ -573,6 +573,14 @@ class ParserOutput extends CacheTime {
                $this->mProperties[$name] = $value;
        }
 
+       /**
+        * @param string $name The property name to look up.
+        *
+        * @return mixed|false The value previously set using setProperty(). False if null or no value
+        * was set for the given property name.
+        *
+        * @note You need to use getProperties() to check for boolean and null properties.
+        */
        public function getProperty( $name ) {
                return isset( $this->mProperties[$name] ) ? $this->mProperties[$name] : false;
        }
@@ -706,7 +714,7 @@ class ParserOutput extends CacheTime {
         *
         * @param string $key The key to look up.
         *
-        * @return mixed The value previously set for the given key using setExtensionData( $key ),
+        * @return mixed|null The value previously set for the given key using setExtensionData()
         *         or null if no value was set for this key.
         */
        public function getExtensionData( $key ) {