|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00027 require_once 'Zend/XmlRpc/Value.php'; 00028 00029 00037 abstract class Zend_XmlRpc_Value_Collection extends Zend_XmlRpc_Value 00038 { 00039 00045 public function __construct($value) 00046 { 00047 $values = (array)$value; // Make sure that the value is an array 00048 foreach ($values as $key => $value) { 00049 // If the elements of the given array are not Zend_XmlRpc_Value objects, 00050 // we need to convert them as such (using auto-detection from PHP value) 00051 if (!$value instanceof parent) { 00052 $value = self::getXmlRpcValue($value, self::AUTO_DETECT_TYPE); 00053 } 00054 $this->_value[$key] = $value; 00055 } 00056 } 00057 00058 00064 public function getValue() 00065 { 00066 $values = (array)$this->_value; 00067 foreach ($values as $key => $value) { 00068 /* @var $value Zend_XmlRpc_Value */ 00069 $values[$key] = $value->getValue(); 00070 } 00071 return $values; 00072 } 00073 }