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 XSL stylesheet to transform product finder
4
 *
5
 * $Id: GetProductFinderXSL.php,v 1.1 2005/01/01 15:48:47 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/GetProductFinderXSL/GetProductFinderXSLLogic.htm
10
 */
11
class Services_Ebay_Call_GetProductFinderXSL extends Services_Ebay_Call
12
{
13
   /**
14
    * verb of the API call
15
    *
16
    * @var  string
17
    */
18
    protected $verb = 'GetProductFinderXSL';
19
 
20
   /**
21
    * parameter map that is used, when scalar parameters are passed
22
    *
23
    * @var  array
24
    */
25
    protected $paramMap = array(
26
                                 'FileName',
27
                                 'Version',
28
                                );
29
 
30
   /**
31
    * arguments of the call
32
    *
33
    * @var  array
34
    */
35
    protected $args = array(
36
                            'DetailLevel' => 1
37
                        );
38
 
39
   /**
40
    * options that will be passed to the unserializer
41
    *
42
    * @var  array
43
    */
44
    protected $unserializerOptions = array(
45
                                            'parseAttributes' => true,
46
                                            'contentName'     => 'Xsl',
47
                                            'forceEnum'       => array('XslFile')
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
 
60
        $result = array();
61
        foreach ($return['ProductFinderXsl']['XslFile'] as $xsl) {
62
        	if (isset($xsl['Xsl'])) {
63
        		$xsl['Xsl'] = base64_decode($xsl['Xsl']);
64
        	}
65
        	array_push($result, $xsl);
66
        }
67
        return $result;
68
    }
69
}
70
?>