Source for file PutAttributes.php

Documentation is available at PutAttributes.php

  1. <?php
  2. /** 
  3.  *  PHP Version 5
  4.  *
  5.  *  @category    Amazon
  6.  *  @package     Amazon_SimpleDB
  7.  *  @copyright   Copyright 2007 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: Wed Jul 23 00:24:22 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_PutAttributes
  32.  * 
  33.  * Properties:
  34.  * <ul>
  35.  * 
  36.  * <li>DomainName: string</li>
  37.  * <li>ItemName: string</li>
  38.  * <li>Attribute: Amazon_SimpleDB_Model_ReplaceableAttribute</li>
  39.  *
  40.  * </ul>
  41.  */ 
  42. {
  43.  
  44.  
  45.     /**
  46.      * Construct new Amazon_SimpleDB_Model_PutAttributes
  47.      * 
  48.      * @param mixed $data DOMElement or Associative Array to construct from.
  49.      * 
  50.      *  Valid properties:
  51.      *  <ul>
  52.      * 
  53.      *  <li>DomainName: string</li>
  54.      *  <li>ItemName: string</li>
  55.      *  <li>Attribute: Amazon_SimpleDB_Model_ReplaceableAttribute</li>
  56.      *
  57.      *  </ul>
  58.      */
  59.     public function __construct($data null)
  60.     {
  61.         $this->_fields = array (
  62.         'DomainName' => array('FieldValue' => null'FieldType' => 'string'),
  63.         'ItemName' => array('FieldValue' => null'FieldType' => 'string'),
  64.         'Attribute' => array('FieldValue' => array()'FieldType' => array('Amazon_SimpleDB_Model_ReplaceableAttribute')),
  65.         );
  66.         parent::__construct($data);
  67.     }
  68.  
  69.         /**
  70.      * Gets the value of the DomainName property.
  71.      * 
  72.      * @return string DomainName
  73.      */
  74.     public function getDomainName(
  75.     {
  76.         return $this->_fields['DomainName']['FieldValue'];
  77.     }
  78.  
  79.     /**
  80.      * Sets the value of the DomainName property.
  81.      * 
  82.      * @param string DomainName
  83.      * @return this instance
  84.      */
  85.     public function setDomainName($value
  86.     {
  87.         $this->_fields['DomainName']['FieldValue'$value;
  88.         return $this;
  89.     }
  90.  
  91.     /**
  92.      * Sets the value of the DomainName and returns this instance
  93.      * 
  94.      * @param string $value DomainName
  95.      * @return Amazon_SimpleDB_Model_PutAttributes instance
  96.      */
  97.     public function withDomainName($value)
  98.     {
  99.         $this->setDomainName($value);
  100.         return $this;
  101.     }
  102.  
  103.  
  104.     /**
  105.      * Checks if DomainName is set
  106.      * 
  107.      * @return bool true if DomainName  is set
  108.      */
  109.     public function isSetDomainName()
  110.     {
  111.         return !is_null($this->_fields['DomainName']['FieldValue']);
  112.     }
  113.  
  114.     /**
  115.      * Gets the value of the ItemName property.
  116.      * 
  117.      * @return string ItemName
  118.      */
  119.     public function getItemName(
  120.     {
  121.         return $this->_fields['ItemName']['FieldValue'];
  122.     }
  123.  
  124.     /**
  125.      * Sets the value of the ItemName property.
  126.      * 
  127.      * @param string ItemName
  128.      * @return this instance
  129.      */
  130.     public function setItemName($value
  131.     {
  132.         $this->_fields['ItemName']['FieldValue'$value;
  133.         return $this;
  134.     }
  135.  
  136.     /**
  137.      * Sets the value of the ItemName and returns this instance
  138.      * 
  139.      * @param string $value ItemName
  140.      * @return Amazon_SimpleDB_Model_PutAttributes instance
  141.      */
  142.     public function withItemName($value)
  143.     {
  144.         $this->setItemName($value);
  145.         return $this;
  146.     }
  147.  
  148.  
  149.     /**
  150.      * Checks if ItemName is set
  151.      * 
  152.      * @return bool true if ItemName  is set
  153.      */
  154.     public function isSetItemName()
  155.     {
  156.         return !is_null($this->_fields['ItemName']['FieldValue']);
  157.     }
  158.  
  159.     /**
  160.      * Gets the value of the Attribute.
  161.      * 
  162.      * @return array of ReplaceableAttribute Attribute
  163.      */
  164.     public function getAttribute(
  165.     {
  166.         return $this->_fields['Attribute']['FieldValue'];
  167.     }
  168.  
  169.     /**
  170.      * Sets the value of the Attribute.
  171.      * 
  172.      * @param mixed ReplaceableAttribute or an array of ReplaceableAttribute Attribute
  173.      * @return this instance
  174.      */
  175.     public function setAttribute($attribute
  176.     {
  177.         if (!$this->_isNumericArray($attribute)) {
  178.             $attribute =  array ($attribute);    
  179.         }
  180.         $this->_fields['Attribute']['FieldValue'$attribute;
  181.         return $this;
  182.     }
  183.  
  184.  
  185.     /**
  186.      * Sets single or multiple values of Attribute list via variable number of arguments.
  187.      * For example, to set the list with two elements, simply pass two values as arguments to this function
  188.      * <code>withAttribute($attribute1, $attribute2)</code>
  189.      * 
  190.      * @param ReplaceableAttribute  $replaceableAttributeArgs one or more Attribute
  191.      * @return Amazon_SimpleDB_Model_PutAttributes  instance
  192.      */
  193.     public function withAttribute($replaceableAttributeArgs)
  194.     {
  195.         foreach (func_get_args(as $attribute{
  196.             $this->_fields['Attribute']['FieldValue'][$attribute;
  197.         }
  198.         return $this;
  199.     }   
  200.  
  201.  
  202.  
  203.     /**
  204.      * Checks if Attribute list is non-empty
  205.      * 
  206.      * @return bool true if Attribute list is non-empty
  207.      */
  208.     public function isSetAttribute()
  209.     {
  210.         return count ($this->_fields['Attribute']['FieldValue']0;
  211.     }
  212.  
  213.  
  214.  
  215.  
  216. }

Documentation generated on Wed, 23 Jul 2008 00:47:41 -0700 by phpDocumentor 1.4.2