From: Sam Reed Date: Wed, 9 Nov 2011 20:52:24 +0000 (+0000) Subject: Bug 31995 - Addition of PPFrame::getTitle X-Git-Tag: 1.31.0-rc.0~26614 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=2849f384d4e26e90d293b81f4a6b06206b016d46;p=lhc%2Fweb%2Fwiklou.git Bug 31995 - Addition of PPFrame::getTitle Applied patch by Van de Bugger Added documentation to go with Added code to Preprocess_HipHop too --- diff --git a/CREDITS b/CREDITS index 2ed738e996..40753c0890 100644 --- 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 diff --git a/includes/parser/Preprocessor.php b/includes/parser/Preprocessor.php index d6328aa738..ae088fdb74 100644 --- a/includes/parser/Preprocessor.php +++ b/includes/parser/Preprocessor.php @@ -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(); } /** diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 461cc7f39e..066589f685 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -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; + } } /** diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index df1c2975e3..2934181a50 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -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; + } } /** diff --git a/includes/parser/Preprocessor_HipHop.hphp b/includes/parser/Preprocessor_HipHop.hphp index 9048d31542..f5af015454 100644 --- a/includes/parser/Preprocessor_HipHop.hphp +++ b/includes/parser/Preprocessor_HipHop.hphp @@ -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; + } } /**