Bug 31995 - Addition of PPFrame::getTitle
authorSam Reed <reedy@users.mediawiki.org>
Wed, 9 Nov 2011 20:52:24 +0000 (20:52 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 9 Nov 2011 20:52:24 +0000 (20:52 +0000)
Applied patch by Van de Bugger

Added documentation to go with

Added code to Preprocess_HipHop too

CREDITS
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Preprocessor_HipHop.hphp

diff --git a/CREDITS b/CREDITS
index 2ed738e..40753c0 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -163,6 +163,7 @@ following names for their contribution to the product.
 * The Evil IP address
 * Tisane
 * Umherirrender
+* Van de Bugger
 * Ville Stadista
 * Vitaliy Filippov
 * William Demchick
index d6328aa..ae088fd 100644 (file)
@@ -27,7 +27,7 @@ interface Preprocessor {
         * Create a new custom frame for programmatic use of parameter replacement as used in some extensions
         *
         * @param $args array
-        * 
+        *
         * @return PPFrame
         */
        function newCustomFrame( $args );
@@ -44,7 +44,7 @@ interface Preprocessor {
         *
         * @param $text
         * @param $flags
-        * 
+        *
         * @return PPNode
         */
        function preprocessToObj( $text, $flags = 0 );
@@ -138,6 +138,13 @@ interface PPFrame {
         * Return true if the frame is a template frame
         */
        function isTemplate();
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       function getTitle();
 }
 
 /**
index 461cc7f..066589f 100644 (file)
@@ -1339,6 +1339,15 @@ class PPFrame_DOM implements PPFrame {
        function isTemplate() {
                return false;
        }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       function getTitle() {
+               return $this->title;
+       }
 }
 
 /**
index df1c297..2934181 100644 (file)
@@ -1268,6 +1268,15 @@ class PPFrame_Hash implements PPFrame {
        function isTemplate() {
                return false;
        }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       function getTitle() {
+               return $this->title;
+       }
 }
 
 /**
index 9048d31..f5af015 100644 (file)
@@ -1008,7 +1008,6 @@ class PPFrame_HipHop implements PPFrame {
         */
        var $depth;
 
-
        /**
         * Construct a new preprocessor frame.
         * @param $preprocessor Preprocessor: the parent preprocessor
@@ -1426,6 +1425,15 @@ class PPFrame_HipHop implements PPFrame {
        function isTemplate() {
                return false;
        }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       function getTitle() {
+               return $this->title;
+       }
 }
 
 /**