Source for file GetAttributesResult.php

Documentation is available at GetAttributesResult.php

  1. <?php
  2. /** 
  3.  *  PHP Version 5
  4.  *
  5.  *  @category    Amazon
  6.  *  @package     Amazon_SimpleDB
  7.  *  @copyright   Copyright 2008 Amazon Technologies, Inc.
  8.  *  @link        http://aws.amazon.com
  9.  *  @license     http://aws.amazon.com/apache2.0  Apache License, Version 2.0
  10.  *  @version     2007-11-07
  11.  */
  12. /******************************************************************************* 
  13.  *    __  _    _  ___ 
  14.  *   (  )( \/\/ )/ __)
  15.  *   /__\ \    / \__ \
  16.  *  (_)(_) \/\/  (___/
  17.  * 
  18.  *  Amazon Simple DB PHP5 Library
  19.  *  Generated: Thu Aug 28 06:20:51 PDT 2008
  20.  * 
  21.  */
  22.  
  23. /**
  24.  *  @see Amazon_SimpleDB_Model
  25.  */
  26. require_once ('Amazon/SimpleDB/Model.php');  
  27.  
  28.     
  29.  
  30. /**
  31.  * Amazon_SimpleDB_Model_GetAttributesResult
  32.  * 
  33.  * Properties:
  34.  * <ul>
  35.  * 
  36.  * <li>Attribute: Amazon_SimpleDB_Model_Attribute</li>
  37.  *
  38.  * </ul>
  39.  */ 
  40. {
  41.  
  42.  
  43.     /**
  44.      * Construct new Amazon_SimpleDB_Model_GetAttributesResult
  45.      * 
  46.      * @param mixed $data DOMElement or Associative Array to construct from.
  47.      * 
  48.      *  Valid properties:
  49.      *  <ul>
  50.      * 
  51.      *  <li>Attribute: Amazon_SimpleDB_Model_Attribute</li>
  52.      *
  53.      *  </ul>
  54.      */
  55.     public function __construct($data null)
  56.     {
  57.         $this->_fields = array (
  58.         'Attribute' => array('FieldValue' => array()'FieldType' => array('Amazon_SimpleDB_Model_Attribute')),
  59.         );
  60.         parent::__construct($data);
  61.     }
  62.  
  63.         /**
  64.      * Gets the value of the Attribute.
  65.      * 
  66.      * @return array of Attribute Attribute
  67.      */
  68.     public function getAttribute(
  69.     {
  70.         return $this->_fields['Attribute']['FieldValue'];
  71.     }
  72.  
  73.     /**
  74.      * Sets the value of the Attribute.
  75.      * 
  76.      * @param mixed Attribute or an array of Attribute Attribute
  77.      * @return this instance
  78.      */
  79.     public function setAttribute($attribute
  80.     {
  81.         if (!$this->_isNumericArray($attribute)) {
  82.             $attribute =  array ($attribute);    
  83.         }
  84.         $this->_fields['Attribute']['FieldValue'$attribute;
  85.         return $this;
  86.     }
  87.  
  88.  
  89.     /**
  90.      * Sets single or multiple values of Attribute list via variable number of arguments.
  91.      * For example, to set the list with two elements, simply pass two values as arguments to this function
  92.      * <code>withAttribute($attribute1, $attribute2)</code>
  93.      * 
  94.      * @param Attribute  $attributeArgs one or more Attribute
  95.      * @return Amazon_SimpleDB_Model_GetAttributesResult  instance
  96.      */
  97.     public function withAttribute($attributeArgs)
  98.     {
  99.         foreach (func_get_args(as $attribute{
  100.             $this->_fields['Attribute']['FieldValue'][$attribute;
  101.         }
  102.         return $this;
  103.     }   
  104.  
  105.  
  106.  
  107.     /**
  108.      * Checks if Attribute list is non-empty
  109.      * 
  110.      * @return bool true if Attribute list is non-empty
  111.      */
  112.     public function isSetAttribute()
  113.     {
  114.         return count ($this->_fields['Attribute']['FieldValue']0;
  115.     }
  116.  
  117.  
  118.  
  119.  
  120. }

Documentation generated on Thu, 28 Aug 2008 06:35:49 -0700 by phpDocumentor 1.4.2