Source for file ErrorResponse.php
Documentation is available at ErrorResponse.php
* @package Amazon_SimpleDB
* @copyright Copyright 2008 Amazon Technologies, Inc.
* @link http://aws.amazon.com
* @license http://aws.amazon.com/apache2.0 Apache License, Version 2.0
/*******************************************************************************
* Amazon Simple DB PHP5 Library
* Generated: Thu Aug 28 06:20:51 PDT 2008
* @see Amazon_SimpleDB_Model
require_once ('Amazon/SimpleDB/Model.php');
* Amazon_SimpleDB_Model_ErrorResponse
* <li>Error: Amazon_SimpleDB_Model_Error</li>
* <li>RequestId: string</li>
* Construct new Amazon_SimpleDB_Model_ErrorResponse
* @param mixed $data DOMElement or Associative Array to construct from.
* <li>Error: Amazon_SimpleDB_Model_Error</li>
* <li>RequestId: string</li>
'Error' =>
array('FieldValue' =>
array(), 'FieldType' =>
array('Amazon_SimpleDB_Model_Error')),
'RequestId' =>
array('FieldValue' =>
null, 'FieldType' =>
'string'),
* Construct Amazon_SimpleDB_Model_ErrorResponse from XML string
* @param string $xml XML string to construct from
* @return Amazon_SimpleDB_Model_ErrorResponse
public static function fromXML($xml)
$dom =
new DOMDocument();
$xpath =
new DOMXPath($dom);
$xpath->registerNamespace('a', 'http://sdb.amazonaws.com/doc/2007-11-07/');
$response =
$xpath->query('//a:${ActionName}Response');
if ($response->length ==
1) {
throw
new Exception ("Unable to construct Amazon_SimpleDB_Model_ErrorResponse from provided XML.
Make sure that ${ActionName}Response is a root element");
* Gets the value of the Error.
* @return array of Error Error
return $this->_fields['Error']['FieldValue'];
* Sets the value of the Error.
* @param mixed Error or an array of Error Error
$this->_fields['Error']['FieldValue'] =
$error;
* Sets single or multiple values of Error list via variable number of arguments.
* For example, to set the list with two elements, simply pass two values as arguments to this function
* <code>withError($error1, $error2)</code>
* @param Error $errorArgs one or more Error
* @return Amazon_SimpleDB_Model_ErrorResponse instance
$this->_fields['Error']['FieldValue'][] =
$error;
* Checks if Error list is non-empty
* @return bool true if Error list is non-empty
* Gets the value of the RequestId property.
* @return string RequestId
return $this->_fields['RequestId']['FieldValue'];
* Sets the value of the RequestId property.
* @param string RequestId
$this->_fields['RequestId']['FieldValue'] =
$value;
* Sets the value of the RequestId and returns this instance
* @param string $value RequestId
* @return Amazon_SimpleDB_Model_ErrorResponse instance
* Checks if RequestId is set
* @return bool true if RequestId is set
* XML Representation for this object
* @return string XML for this object
$xml .=
"<ErrorResponse xmlns=\"http://sdb.amazonaws.com/doc/2007-11-07/\">";
$xml .=
"</ErrorResponse>";
Documentation generated on Thu, 28 Aug 2008 06:35:47 -0700 by phpDocumentor 1.4.2