1 | <?php |
||
11 | class Webservice |
||
12 | { |
||
13 | const REST_ACTION_SEND_FAMILY = 'family'; |
||
14 | const REST_ACTION_SEND_PRODUCT = 'product'; |
||
15 | const REST_ACTION_SEND_ATTRIBUTE_OPTION = 'option'; |
||
16 | const REST_ACTION_SEND_CATEGORY = 'category'; |
||
17 | const REST_ACTION_SEND_GROUP = 'group'; |
||
18 | const REST_ACTION_SEND_ASSOCIATION = 'association'; |
||
19 | |||
20 | /** |
||
21 | * @var DrupalRestClient |
||
22 | */ |
||
23 | protected $drupalRestClient; |
||
24 | |||
25 | /** |
||
26 | * @param DrupalRestClient $drupalRestClient |
||
27 | */ |
||
28 | public function __construct(DrupalRestClient $drupalRestClient) |
||
32 | |||
33 | /** |
||
34 | * @param array $parameters |
||
35 | * @throws Exception\RestConnectionException |
||
36 | */ |
||
37 | public function setParameters(array $parameters) |
||
41 | |||
42 | /** |
||
43 | * @param array $family |
||
44 | * @return \Guzzle\Http\Message\Response|mixed |
||
45 | */ |
||
46 | public function sendFamily($family) |
||
53 | |||
54 | /** |
||
55 | * @param $option |
||
56 | * @return \Guzzle\Http\Message\Response|mixed |
||
57 | */ |
||
58 | public function sendAttributeOption($attributeOption) |
||
65 | |||
66 | /** |
||
67 | * @param array $category |
||
68 | * @return \Guzzle\Http\Message\Response|mixed |
||
69 | */ |
||
70 | public function sendCategory($category) |
||
77 | |||
78 | /** |
||
79 | * @param array $group |
||
80 | * @return \Guzzle\Http\Message\Response|mixed |
||
81 | */ |
||
82 | public function sendGroup($group) |
||
89 | |||
90 | /** |
||
91 | * @param array $association |
||
92 | * @return \Guzzle\Http\Message\Response|mixed |
||
93 | */ |
||
94 | public function sendAssociation($association) |
||
101 | |||
102 | /** |
||
103 | * @param array $product |
||
104 | * @return \Guzzle\Http\Message\Response|mixed |
||
105 | */ |
||
106 | public function sendProduct($product) |
||
113 | } |
||
114 |