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 user preferences
4
 *
5
 * $Id: GetPreferences.php,v 1.1 2004/10/28 17:14:53 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/GetPreferences/GetPreferencesLogic.htm
10
 * @todo    build a model for preferences
11
 */
12
class Services_Ebay_Call_GetPreferences extends Services_Ebay_Call
13
{
14
   /**
15
    * verb of the API call
16
    *
17
    * @var  string
18
    */
19
    protected $verb = 'GetPreferences';
20
 
21
   /**
22
    * options that will be passed to the serializer
23
    *
24
    * @var  array
25
    */
26
    protected $serializerOptions = array(
27
                                            'defaultTagName' => 'Preference'
28
                                        );
29
   /**
30
    * create a new call
31
    *
32
    * @param    array   details you want to retrieve
33
    */
34
    public function __construct($args)
35
    {
36
        if (!empty($args)) {
37
            if (is_array($args[0])) {
38
                $this->args['Preferences'] = $args[0];
39
            } else {
40
                $this->args['Preferences'] = array( $args[0] );
41
            }
42
        }
43
    }
44
 
45
   /**
46
    * make the API call
47
    *
48
    * @param    object Services_Ebay_Session
49
    * @return   string
50
    */
51
    public function call(Services_Ebay_Session $session)
52
    {
53
        $return = parent::call($session);
54
        return Services_Ebay::loadModel('Preferences', $return['GetPreferencesResult']['Preferences'], $session);
55
    }
56
}
57
?>