Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?PHP
2
/**
3
 * Get Details about an eBay site
4
 *
5
 * $Id: GeteBayDetails.php,v 1.2 2004/12/14 19:08:25 schst Exp $
6
 *
7
 * @package Services_Ebay
8
 * @author  Stephan Schmidt <schst@php.net>
9
 * @link    http://developer.ebay.com/DevZone/docs/API_Doc/Functions/GeteBayDetails/GeteBayDetailsLogic.htm
10
 */
11
class Services_Ebay_Call_GeteBayDetails extends Services_Ebay_Call
12
{
13
   /**
14
    * verb of the API call
15
    *
16
    * @var  string
17
    */
18
    protected $verb = 'GeteBayDetails';
19
 
20
   /**
21
    * options that will be passed to the serializer
22
    *
23
    * @var  array
24
    */
25
    protected $serializerOptions = array(
26
                                            'defaultTagName' => 'Detail'
27
                                        );
28
   /**
29
    * create a new call
30
    *
31
    * @param    array   details you want to retrieve
32
    */
33
    public function __construct($args)
34
    {
35
        if (!empty($args)) {
36
            $this->args['Details'] = array();
37
            foreach ($args as $detail) {
38
            	array_push($this->args['Details'], array('Name' => $detail));
39
            }
40
        }
41
    }
42
 
43
   /**
44
    * make the API call
45
    *
46
    * @param    object Services_Ebay_Session
47
    * @return   string
48
    */
49
    public function call(Services_Ebay_Session $session)
50
    {
51
        $return = parent::call($session);
52
        if (!isset($return['Details']['Detail'][0])) {
53
            $return['Details']['Detail'] = array($return['Details']['Detail']);
54
        }
55
        return $return['Details']['Detail'];
56
    }
57
}
58
?>