From 16716160882b5b73f1ec19cb18ea925c08dd6307 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Thu, 2 Jul 2009 16:21:30 +0000 Subject: [PATCH] Add getArguments, getNamedArguments and getNumberedArguments methods to PPFrame interface, so extensions can access them. --- includes/parser/Preprocessor.php | 15 +++++++++++++++ includes/parser/Preprocessor_DOM.php | 12 ++++++++++++ includes/parser/Preprocessor_Hash.php | 12 ++++++++++++ 3 files changed, 39 insertions(+) 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 */ -- 2.20.1