public function setValue($value) { if (null !== $value and !$value instanceof parent) { $this->_value = parent::parse($value); } else { $this->_value = $value; } $this->_asDom = null; $this->_asXml = null; }
public function setValue($value) { if (is_array($value)) { $this->_value = array(); foreach ($value as $key => $el) { if (!$el instanceof parent) { $this->_value[$key] = parent::parse($el); } else { $this->_value[$key] = $el; } } } $this->_asXml = null; $this->_asDom = null; return $this; }
public function testXmlElementKeyIsInternallyRestricted() { $this->setExpectedException('Zend_Service_SecondLife_Value_Exception'); Zend_Service_SecondLife_Value::fromXml('<key>foo</key>'); }
protected function _parseResponse($response) { require_once 'Zend/Service/SecondLife/Value.php'; $value = Zend_Service_SecondLife_Value::fromXml($response)->getValue(); return $value; }