From 76dac45ebaf104b312a8527a05424601ca9d520a Mon Sep 17 00:00:00 2001 From: ewinslow Date: Mon, 6 Sep 2010 02:42:09 +0000 Subject: Refs #2220: Pulled most classes / interfaces out of lib files (except query.php and exception.php) into "classes" folder. Replaced inline classes with "require_once" statements for now. Ran unit tests to verify functionality before committing. git-svn-id: http://code.elgg.org/elgg/trunk@6908 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/XMLRPCStructParameter.php | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 engine/classes/XMLRPCStructParameter.php (limited to 'engine/classes/XMLRPCStructParameter.php') diff --git a/engine/classes/XMLRPCStructParameter.php b/engine/classes/XMLRPCStructParameter.php new file mode 100644 index 000000000..326a82804 --- /dev/null +++ b/engine/classes/XMLRPCStructParameter.php @@ -0,0 +1,49 @@ + $v) + $this->addField($k, $v); + } + } + + /** + * Add a field to the container. + * + * @param string $name The name of the field. + * @param XMLRPCParameter $value The value. + */ + public function addField($name, XMLRPCParameter $value) + { + if (!is_array($this->value)) + $this->value = array(); + + $this->value[$name] = $value; + } + + function __toString() + { + $params = ""; + foreach ($this->value as $k => $v) + { + $params .= "$k$v"; + } + + return "$params"; + } +} \ No newline at end of file -- cgit v1.2.3