1 | <?php |
||
8 | class CertainApiService{ |
||
9 | /** |
||
10 | * An instance of the CertainApiClient |
||
11 | * @var CertainApiClient |
||
12 | */ |
||
13 | private $certainClient; |
||
14 | |||
15 | /** |
||
16 | * Service constructor |
||
17 | * @param CertainApiClient $certainClient |
||
18 | */ |
||
19 | public function __construct(CertainApiClient $certainClient) |
||
23 | |||
24 | public function setCertainClient(CertainApiClient $certainClient) |
||
29 | |||
30 | /** |
||
31 | * Get Account Code |
||
32 | * @return string |
||
33 | */ |
||
34 | public function getAccountCode() |
||
38 | |||
39 | /** |
||
40 | * Get the certain api client |
||
41 | * @return CertainApiClient |
||
42 | */ |
||
43 | public function getCertainClient(){ |
||
46 | |||
47 | /** |
||
48 | * Send a "GET" request to get information about ressource; |
||
49 | * @param string $ressourceName |
||
50 | * @param string $ressourcePath |
||
51 | * @param string $ressourceId |
||
52 | * @param array $params |
||
53 | * @param boolean $assoc |
||
54 | * @param string $contentType |
||
55 | * @return array |
||
56 | */ |
||
57 | public function get($ressourceName, $ressourcePath =null, $ressourceId=null, $params = array(),$assoc = false,$contentType='json'){ |
||
60 | |||
61 | /** |
||
62 | * Send a "POST" request to put information to certain; |
||
63 | * @param string $ressourceName |
||
64 | * @param string $ressourcePath |
||
65 | * @param string $ressourceId |
||
66 | * @param array $bodyData |
||
67 | * @param array $query |
||
68 | * @param boolean $assoc |
||
69 | * @param string $contentType |
||
70 | * @return array |
||
71 | */ |
||
72 | public function post($ressourceName, $ressourcePath =null, $ressourceId=null, $bodyData = array(),$query=array(), $assoc = false,$contentType='json'){ |
||
75 | |||
76 | |||
77 | /** |
||
78 | * Send a "PUT" request to put information to certain; |
||
79 | * @param string $ressourceName |
||
80 | * @param string $ressourcePath |
||
81 | * @param string $ressourceId |
||
82 | * @param array $bodyData |
||
83 | * @param array $query |
||
84 | * @param boolean $assoc |
||
85 | * @param string $contentType |
||
86 | * @return array |
||
87 | */ |
||
88 | public function put($ressourceName, $ressourcePath =null, $ressourceId=null, $bodyData = array(),$query=array(), $assoc = false,$contentType='json'){ |
||
91 | |||
92 | /** |
||
93 | * Send a "DELETE" request to delete information from certain; |
||
94 | * @param string $ressourceName |
||
95 | * @param string $ressourcePath |
||
96 | * @param string $ressourceId |
||
97 | * @param boolean $assoc |
||
98 | * @param string $contentType |
||
99 | * @return array |
||
100 | */ |
||
101 | public function delete($ressourceName, $ressourcePath =null, $ressourceId=null, $assoc = false,$contentType='json'){ |
||
104 | |||
105 | |||
106 | } |