Services_Ebay
[ class tree: Services_Ebay ] [ index: Services_Ebay ] [ all elements ]

Source for file Account.php

Documentation is available at Account.php

  1. <?PHP
  2. /**
  3.  * Model for an eBay account
  4.  *
  5.  *
  6.  * @package Services_Ebay
  7.  * @author  Stephan Schmidt <schst@php.net>
  8.  */
  9. class Services_Ebay_Model_Account extends Services_Ebay_Model implements IteratorAggregate
  10. {
  11.    /**
  12.     * entries in the account
  13.     *
  14.     * @var  array 
  15.     */
  16.     private $entries = array();
  17.     
  18.    /**
  19.     * create new model
  20.     *
  21.     * @param    array 
  22.     * @param    object 
  23.     */
  24.     public function __construct($props$session = null)
  25.     {
  26.         if (isset($props['AccountEntry'])) {
  27.             $entries $props['AccountEntry'];
  28.             unset($props['AccountEntry']);
  29.             if (isset($entries[0])) {
  30.                 $this->entries $entries;
  31.             else {
  32.                 $this->entries = array($entries);
  33.             }
  34.         }
  35.         parent::__construct($props$session);
  36.     }
  37.  
  38.    /**
  39.     * iterate through the items
  40.     *
  41.     * @return   object 
  42.     */
  43.     public function getIterator()
  44.     {
  45.         $it = new ArrayObject($this->entries);
  46.         return $it;
  47.     }
  48. }
  49. ?>

Documentation generated on Mon, 11 Mar 2019 15:49:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.