From: Victor Vasiliev Date: Thu, 2 Jul 2009 16:21:30 +0000 (+0000) Subject: Add getArguments, getNamedArguments and getNumberedArguments methods to PPFrame X-Git-Tag: 1.31.0-rc.0~41130 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=16716160882b5b73f1ec19cb18ea925c08dd6307;p=lhc%2Fweb%2Fwiklou.git Add getArguments, getNamedArguments and getNumberedArguments methods to PPFrame interface, so extensions can access them. --- diff --git a/includes/parser/Preprocessor.php b/includes/parser/Preprocessor.php index 1a33ac7fc1..9c417d23f9 100644 --- a/includes/parser/Preprocessor.php +++ b/includes/parser/Preprocessor.php @@ -65,6 +65,21 @@ interface PPFrame { */ function isEmpty(); + /** + * Returns all arguments of this frame + */ + function getArguments(); + + /** + * Returns all numbered arguments of this frame + */ + function getNumberedArguments(); + + /** + * Returns all named arguments of this frame + */ + function getNamedArguments(); + /** * Get an argument to this frame by name */ diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 2e1145459c..08e1c7934f 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -1189,6 +1189,18 @@ class PPFrame_DOM implements PPFrame { } } + function getArguments() { + return array(); + } + + function getNumberedArguments() { + return array(); + } + + function getNamedArguments() { + return array(); + } + /** * Returns true if there are no arguments in this frame */ diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index f46ee40ce9..4769e11a6d 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -1139,6 +1139,18 @@ class PPFrame_Hash implements PPFrame { } } + function getArguments() { + return array(); + } + + function getNumberedArguments() { + return array(); + } + + function getNamedArguments() { + return array(); + } + /** * Returns true if there are no arguments in this frame */