home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / Services / Ebay / Model / MyeBay.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  961 b   |  42 lines

  1. <?PHP
  2. /**
  3.  * Model for My eBay
  4.  *
  5.  * @package Services_Ebay
  6.  * @author  Stephan Schmidt <schst@php.net>
  7.  * @todo    implement some helper methods to work with the lists
  8.  */
  9. class Services_Ebay_Model_MyeBay extends Services_Ebay_Model implements IteratorAggregate
  10. {
  11.    /**
  12.     * available item lists
  13.     *
  14.     * @var  array
  15.     */
  16.     private $lists = array();
  17.  
  18.    /**
  19.     * create a new item list
  20.     *
  21.     * @param    array   properties
  22.     * @param    object Services_Ebay_Session
  23.     */
  24.     public function __construct($props, $session = null)
  25.     {
  26.         foreach ($props as $list => $data) {
  27.             $this->lists[$list] = Services_Ebay::loadModel('ItemList', $data, $session);
  28.         }
  29.     }
  30.  
  31.    /**
  32.     * get the iterator for the items in the list
  33.     *
  34.     * @return   object
  35.     */
  36.     public function getIterator()
  37.     {
  38.         $iterator = new ArrayObject($this->lists);
  39.         return $iterator;
  40.     }
  41. }
  42. ?>