-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMWSClient.php
More file actions
42 lines (35 loc) · 1.01 KB
/
MWSClient.php
File metadata and controls
42 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace Vlabs\AmazonMWSBundle;
class MWSClient
{
protected $searchClient;
protected $config = array();
public function get($service)
{
switch($service)
{
case 'search' :
return $this->getSearch();
break;
default :
throw new \Exception(sprintf('%s %s', $service, 'is not a supported MWS Service identifier'));
}
}
private function getSearch()
{
if(empty($this->searchClient)) {
$this->searchClient = new \MwsSearchClient(
$this->config['access_key'],
$this->config['secret_key'],
$this->config['application_name'],
$this->config['application_version'],
$this->config['config']
);
}
return $this->searchClient;
}
public function setConfig($config = array())
{
$this->config = $config;
}
}