@@ -147,8 +147,8 @@ discard block |
||
147 | 147 | * @return array |
148 | 148 | */ |
149 | 149 | public function post($ressourceName, $ressourcePath =null, $ressourceId = null, |
150 | - $bodyData = array(), $query = array(), $assoc = false, |
|
151 | - $contentType = 'json') |
|
150 | + $bodyData = array(), $query = array(), $assoc = false, |
|
151 | + $contentType = 'json') |
|
152 | 152 | { |
153 | 153 | if ($contentType !== 'json') { |
154 | 154 | throw new \Exception('Use only json to update or create'); |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | * @return array |
180 | 180 | */ |
181 | 181 | public function put($ressourceName, $ressourcePath =null, $ressourceId = null, |
182 | - $bodyData = array(), $query = array(), $assoc = false, |
|
183 | - $contentType = 'json') |
|
182 | + $bodyData = array(), $query = array(), $assoc = false, |
|
183 | + $contentType = 'json') |
|
184 | 184 | { |
185 | 185 | if ($contentType !== 'json') { |
186 | 186 | throw new \Exception('Use only json to update or create'); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * @return array |
210 | 210 | */ |
211 | 211 | public function delete($ressourceName, $ressourcePath =null, $ressourceId = null, $assoc = false, |
212 | - $contentType = 'json') |
|
212 | + $contentType = 'json') |
|
213 | 213 | { |
214 | 214 | try { |
215 | 215 | $urlRessource = $this->builPathToCall($ressourceName, $ressourcePath, $ressourceId); |
@@ -45,59 +45,59 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 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 | - */ |
|
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 | 57 | public function get($ressourceName, $ressourcePath =null, $ressourceId=null, $params = array(),$assoc = false,$contentType='json'){ |
58 | 58 | return $this->getCertainClient()->get($ressourceName, $ressourcePath, $ressourceId, $params, $assoc,$contentType); |
59 | 59 | } |
60 | 60 | |
61 | 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 | - */ |
|
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 | 72 | public function post($ressourceName, $ressourcePath =null, $ressourceId=null, $bodyData = array(),$query=array(), $assoc = false,$contentType='json'){ |
73 | 73 | return $this->getCertainClient()->post($ressourceName, $ressourcePath, $ressourceId, $bodyData, $query, $assoc,$contentType); |
74 | 74 | } |
75 | 75 | |
76 | 76 | |
77 | 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 | - */ |
|
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 | 88 | public function put($ressourceName, $ressourcePath =null, $ressourceId=null, $bodyData = array(),$query=array(), $assoc = false,$contentType='json'){ |
89 | 89 | return $this->getCertainClient()->put($ressourceName, $ressourcePath, $ressourceId, $bodyData, $query, $assoc,$contentType); |
90 | 90 | } |
91 | 91 | |
92 | 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 | - */ |
|
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 | 101 | public function delete($ressourceName, $ressourcePath =null, $ressourceId=null, $assoc = false,$contentType='json'){ |
102 | 102 | return $this->getCertainClient()->delete($ressourceName, $ressourcePath, $ressourceId, $assoc,$contentType); |
103 | 103 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | return $this; |
87 | 87 | } |
88 | 88 | |
89 | - /** |
|
89 | + /** |
|
90 | 90 | * Update information to certain |
91 | 91 | * @param array $bodyData |
92 | 92 | * @param array $query |
@@ -57,9 +57,9 @@ |
||
57 | 57 | $bodyString = $streamBody->getContents(); |
58 | 58 | |
59 | 59 | if($contentType === 'json'){ |
60 | - $response['results'] = $this->jsonp_decode($bodyString, $assoc); |
|
60 | + $response['results'] = $this->jsonp_decode($bodyString, $assoc); |
|
61 | 61 | }else{ |
62 | - $response['results']=$bodyString; |
|
62 | + $response['results']=$bodyString; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | $response['success'] = true; |