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

Source for file BidList.php

Documentation is available at BidList.php

  1. <?PHP
  2. /**
  3.  * Model for a list of bids
  4.  *
  5.  * $Id$
  6.  *
  7.  * @package Services_Ebay
  8.  * @author  Carsten Lucke <luckec@php.net>
  9.  */
  10. class Services_Ebay_Model_BidList extends Services_Ebay_Model implements IteratorAggregate
  11. {
  12.    /**
  13.     * bids
  14.     *
  15.     * @var  array 
  16.     */
  17.     private $bids = array();
  18.     
  19.     /**
  20.      * Number of bids in the bid-list
  21.      * 
  22.      * @var integer 
  23.      */
  24.     private $count = 0;
  25.     
  26.    /**
  27.     * create new feedback model
  28.     *
  29.     * @param    array   feedback
  30.     */
  31.     public function __construct($bids$session = null)
  32.     {
  33.         $this->count = (integer)$bids['Bids']['Count'];
  34.         
  35.         if (isset($bids['Bids']['Bid'])) {
  36.             if (!isset($bids['Bids']['Bid'][0])) {
  37.                 $bids['Bids']['Bid'= array($bids['Bids']['Bid']);
  38.             }
  39.             foreach ($bids['Bids']['Bid'as $tmp{
  40.                 array_push($this->bidsServices_Ebay::loadModel('Bid'$tmp$session));
  41.             }
  42.             unset($bids['Bids']);
  43.         }
  44.         parent::__construct($bids);
  45.     }
  46.     
  47.    /**
  48.     * iterate through the transactions
  49.     *
  50.     * @return array 
  51.     */
  52.     public function getIterator()
  53.     {
  54.         return new ArrayObject($this->bids);
  55.     }
  56.     
  57.     /**
  58.      * Returns the number of bids, the bid-list contains.
  59.      * 
  60.      * @return integer  number of bids
  61.      */
  62.     public function getCount({
  63.         return $this->count;
  64.     }
  65. }
  66. ?>

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