Add getArguments, getNamedArguments and getNumberedArguments methods to PPFrame
authorVictor Vasiliev <vasilievvv@users.mediawiki.org>
Thu, 2 Jul 2009 16:21:30 +0000 (16:21 +0000)
committerVictor Vasiliev <vasilievvv@users.mediawiki.org>
Thu, 2 Jul 2009 16:21:30 +0000 (16:21 +0000)
interface, so extensions can access them.

includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php

index 1a33ac7..9c417d2 100644 (file)
@@ -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
         */
index 2e11454..08e1c79 100644 (file)
@@ -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
         */
index f46ee40..4769e11 100644 (file)
@@ -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
         */