Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?PHP
2
/**
3
 * Set eBay preferences
4
 *
5
 * $Id: SetPreferences.php,v 1.3 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/SetPreferences/SetPreferencesLogic.htm
10
 */
11
class Services_Ebay_Call_SetPreferences extends Services_Ebay_Call
12
{
13
   /**
14
    * verb of the API call
15
    *
16
    * @var  string
17
    */
18
    protected $verb = 'SetPreferences';
19
 
20
   /**
21
    * options that will be passed to the serializer
22
    *
23
    * @var  array
24
    */
25
    protected $serializerOptions = array(
26
                                            'mode' => 'simplexml'
27
                                        );
28
   /**
29
    * parameter map that is used, when scalar parameters are passed
30
    *
31
    * @var  array
32
    */
33
    protected $paramMap = array();
34
 
35
   /**
36
    * constructor
37
    *
38
    * @param    array
39
    */
40
    public function __construct($args)
41
    {
42
        $prefs = $args[0];
43
 
44
        if (!$prefs instanceof Services_Ebay_Model_Preferences ) {
45
            throw new Services_Ebay_Exception( 'No preferences passed.' );
46
        }
47
        $this->args = $prefs->toArray();
48
    }
49
 
50
   /**
51
    * make the API call
52
    *
53
    * @param    object Services_Ebay_Session
54
    * @return   string
55
    */
56
    public function call(Services_Ebay_Session $session)
57
    {
58
        $return = parent::call($session);
59
        if ($return['CallStatus']['Status'] === 'Success') {
60
        	return true;
61
        }
62
        return false;
63
    }
64
}
65
?>