@@ -133,6 +133,7 @@ |
||
133 | 133 | |
134 | 134 | /** |
135 | 135 | * @inheritdoc |
136 | + * @param string $body |
|
136 | 137 | */ |
137 | 138 | public function setBody($body) { |
138 | 139 | $this->body = $body; |
@@ -90,7 +90,7 @@ |
||
90 | 90 | /** |
91 | 91 | * Always make sure to destroy Curl Resource |
92 | 92 | */ |
93 | - public function __destruct() { |
|
93 | + public function __destruct(){ |
|
94 | 94 | if ($this->status!==self::STATUS_CLOSED){ |
95 | 95 | curl_close($this->CurlRequest); |
96 | 96 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | /** |
91 | 91 | * Always make sure to destroy Curl Resource |
92 | 92 | */ |
93 | - public function __destruct() { |
|
93 | + public function __destruct(){ |
|
94 | 94 | if ($this->status!==self::STATUS_CLOSED){ |
95 | 95 | curl_close($this->CurlRequest); |
96 | 96 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class EntryPointException extends SDKException { |
6 | 6 | |
7 | - public function __construct($message) { |
|
7 | + public function __construct($message){ |
|
8 | 8 | parent::__construct($message); |
9 | 9 | } |
10 | 10 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class EntryPointException extends SDKException { |
6 | 6 | |
7 | - public function __construct($message) { |
|
7 | + public function __construct($message){ |
|
8 | 8 | parent::__construct($message); |
9 | 9 | } |
10 | 10 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $data[$fileField] = $this->setFileFieldValue($data[$fileField]); |
48 | 48 | }else{ |
49 | 49 | foreach ($this->Data as $key => $value){ |
50 | - if (!array_key_exists($key,$this->_REQUIRED_DATA)){ |
|
50 | + if (!array_key_exists($key, $this->_REQUIRED_DATA)){ |
|
51 | 51 | $data[$key] = $this->setFileFieldValue($value); |
52 | 52 | } |
53 | 53 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | protected function configureData($data){ |
35 | 35 | if (!empty($this->Options)){ |
36 | 36 | $fileField = end($this->Options); |
37 | - }else{ |
|
37 | + } else{ |
|
38 | 38 | throw new RequiredOptionsException(get_called_class()); |
39 | 39 | } |
40 | 40 | if (is_string($data) && isset($fileField)){ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | if (is_array($data)){ |
46 | 46 | if (isset($fileField)){ |
47 | 47 | $data[$fileField] = $this->setFileFieldValue($data[$fileField]); |
48 | - }else{ |
|
48 | + } else{ |
|
49 | 49 | foreach ($this->Data as $key => $value){ |
50 | 50 | if (!array_key_exists($key,$this->_REQUIRED_DATA)){ |
51 | 51 | $data[$key] = $this->setFileFieldValue($value); |
@@ -30,22 +30,22 @@ |
||
30 | 30 | 'method' => '' |
31 | 31 | ); |
32 | 32 | |
33 | - protected function configureData($data) { |
|
33 | + protected function configureData($data){ |
|
34 | 34 | $requestData = array( |
35 | 35 | 'requests' => array() |
36 | 36 | ); |
37 | 37 | $counter = 0; |
38 | - foreach($data as $key => $EntryPoint){ |
|
39 | - if (is_object($EntryPoint)) { |
|
38 | + foreach ($data as $key => $EntryPoint){ |
|
39 | + if (is_object($EntryPoint)){ |
|
40 | 40 | $requestData['requests'][$counter] = $this->bulkRequest; |
41 | 41 | $requestData['requests'][$counter]['method'] = $EntryPoint->getRequest()->getType(); |
42 | - if ($requestData['requests'][$counter]['method'] == "POST" || $requestData['requests'][$counter]['method'] == "PUT") { |
|
42 | + if ($requestData['requests'][$counter]['method']=="POST" || $requestData['requests'][$counter]['method']=="PUT"){ |
|
43 | 43 | $requestData['requests'][$counter]['data'] = $EntryPoint->getRequest()->getBody(); |
44 | - } else { |
|
44 | + }else{ |
|
45 | 45 | unset($requestData['requests'][$counter]['data']); |
46 | 46 | } |
47 | 47 | $requestData['requests'][$counter]['headers'] = $EntryPoint->getRequest()->getHeaders(); |
48 | - $requestData['requests'][$counter]['url'] = "v10/" . str_replace($this->baseUrl, "", $EntryPoint->getUrl()); |
|
48 | + $requestData['requests'][$counter]['url'] = "v10/".str_replace($this->baseUrl, "", $EntryPoint->getUrl()); |
|
49 | 49 | |
50 | 50 | $counter++; |
51 | 51 | } |
@@ -30,18 +30,18 @@ |
||
30 | 30 | 'method' => '' |
31 | 31 | ); |
32 | 32 | |
33 | - protected function configureData($data) { |
|
33 | + protected function configureData($data){ |
|
34 | 34 | $requestData = array( |
35 | 35 | 'requests' => array() |
36 | 36 | ); |
37 | 37 | $counter = 0; |
38 | 38 | foreach($data as $key => $EntryPoint){ |
39 | - if (is_object($EntryPoint)) { |
|
39 | + if (is_object($EntryPoint)){ |
|
40 | 40 | $requestData['requests'][$counter] = $this->bulkRequest; |
41 | 41 | $requestData['requests'][$counter]['method'] = $EntryPoint->getRequest()->getType(); |
42 | - if ($requestData['requests'][$counter]['method'] == "POST" || $requestData['requests'][$counter]['method'] == "PUT") { |
|
42 | + if ($requestData['requests'][$counter]['method'] == "POST" || $requestData['requests'][$counter]['method'] == "PUT"){ |
|
43 | 43 | $requestData['requests'][$counter]['data'] = $EntryPoint->getRequest()->getBody(); |
44 | - } else { |
|
44 | + } else{ |
|
45 | 45 | unset($requestData['requests'][$counter]['data']); |
46 | 46 | } |
47 | 47 | $requestData['requests'][$counter]['headers'] = $EntryPoint->getRequest()->getHeaders(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @param $EntryPoint - EPInterface Class Name |
32 | 32 | * @return $this |
33 | 33 | */ |
34 | - public function registerEntryPoint($function,$EntryPoint); |
|
34 | + public function registerEntryPoint($function, $EntryPoint); |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Login to the configured SugarCRM server |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param $client_id |
58 | 58 | * @return boolean |
59 | 59 | */ |
60 | - public static function storeToken($token,$client_id); |
|
60 | + public static function storeToken($token, $client_id); |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Get an SDK Clients authentication Token from Storage |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | */ |
61 | 61 | protected $entryPoints = array(); |
62 | 62 | |
63 | - public function __construct($server = '',array $credentials = array()){ |
|
64 | - if (!empty($server)) { |
|
63 | + public function __construct($server = '', array $credentials = array()){ |
|
64 | + if (!empty($server)){ |
|
65 | 65 | $this->setServer($server); |
66 | 66 | } |
67 | 67 | if (!empty($credentials)){ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | /** |
74 | 74 | * @inheritdoc |
75 | 75 | */ |
76 | - public function setServer($server) { |
|
76 | + public function setServer($server){ |
|
77 | 77 | $this->server = $server; |
78 | 78 | $this->apiURL = Helpers::configureAPIURL($this->server); |
79 | 79 | return $this; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * @inheritdoc |
84 | 84 | */ |
85 | - public function getAPIUrl() { |
|
85 | + public function getAPIUrl(){ |
|
86 | 86 | return $this->apiURL; |
87 | 87 | } |
88 | 88 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | /** |
126 | 126 | * @inheritdoc |
127 | 127 | */ |
128 | - public function getServer() { |
|
128 | + public function getServer(){ |
|
129 | 129 | return $this->server; |
130 | 130 | } |
131 | 131 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @inheritdoc |
134 | 134 | */ |
135 | 135 | public function authenticated(){ |
136 | - return time() < $this->expiration; |
|
136 | + return time()<$this->expiration; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function registerEntryPoint($funcName, $className){ |
157 | 157 | $implements = class_implements($className); |
158 | - if (is_array($implements) && in_array('SugarAPI\SDK\EntryPoint\Interfaces\EPInterface',$implements)){ |
|
158 | + if (is_array($implements) && in_array('SugarAPI\SDK\EntryPoint\Interfaces\EPInterface', $implements)){ |
|
159 | 159 | $this->entryPoints[$funcName] = $className; |
160 | 160 | }else{ |
161 | - throw new EntryPointException($className,'Class must extend SugarAPI\SDK\EntryPoint\Interfaces\EPInterface'); |
|
161 | + throw new EntryPointException($className, 'Class must extend SugarAPI\SDK\EntryPoint\Interfaces\EPInterface'); |
|
162 | 162 | } |
163 | 163 | return $this; |
164 | 164 | } |
@@ -176,13 +176,13 @@ discard block |
||
176 | 176 | $EntryPoint = new $Class($this->apiURL, $params); |
177 | 177 | |
178 | 178 | if ($EntryPoint->authRequired()){ |
179 | - if (isset($this->token) && $this->authenticated()) { |
|
179 | + if (isset($this->token) && $this->authenticated()){ |
|
180 | 180 | $EntryPoint->setAuth($this->getToken()->access_token); |
181 | 181 | } |
182 | 182 | } |
183 | 183 | return $EntryPoint; |
184 | 184 | }else{ |
185 | - throw new EntryPointException($name,'Unregistered EntryPoint'); |
|
185 | + throw new EntryPointException($name, 'Unregistered EntryPoint'); |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 | |
@@ -190,13 +190,13 @@ discard block |
||
190 | 190 | * @inheritdoc |
191 | 191 | * @throws AuthenticationException - When Login request fails |
192 | 192 | */ |
193 | - public function login() { |
|
193 | + public function login(){ |
|
194 | 194 | $EP = new OAuth2Token($this->apiURL); |
195 | 195 | $response = $EP->execute($this->credentials)->getResponse(); |
196 | 196 | if ($response->getStatus()=='200'){ |
197 | 197 | $this->setToken($response->getBody(false)); |
198 | - static::storeToken($this->token,$this->credentials['client_id']); |
|
199 | - } else { |
|
198 | + static::storeToken($this->token, $this->credentials['client_id']); |
|
199 | + }else{ |
|
200 | 200 | $error = $response->getBody(); |
201 | 201 | throw new AuthenticationException("Login Response [".$error['error']."] ".$error['error_message']); |
202 | 202 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $response = $EP->execute($refreshOptions)->getResponse(); |
218 | 218 | if ($response->getStatus()=='200'){ |
219 | 219 | $this->setToken($response->getBody(false)); |
220 | - static::storeToken($this->token,$this->credentials['client_id']); |
|
220 | + static::storeToken($this->token, $this->credentials['client_id']); |
|
221 | 221 | }else{ |
222 | 222 | $error = $response->getBody(); |
223 | 223 | throw new AuthenticationException("Refresh Response [".$error['error']."] ".$error['error_message']); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | /** |
248 | 248 | * @inheritdoc |
249 | 249 | */ |
250 | - public static function storeToken($token, $client_id) { |
|
250 | + public static function storeToken($token, $client_id){ |
|
251 | 251 | static::$_STORED_TOKENS[$client_id] = $token; |
252 | 252 | return true; |
253 | 253 | } |
@@ -255,14 +255,14 @@ discard block |
||
255 | 255 | /** |
256 | 256 | * @inheritdoc |
257 | 257 | */ |
258 | - public static function getStoredToken($client_id) { |
|
258 | + public static function getStoredToken($client_id){ |
|
259 | 259 | return static::$_STORED_TOKENS[$client_id]; |
260 | 260 | } |
261 | 261 | |
262 | 262 | /** |
263 | 263 | * @inheritdoc |
264 | 264 | */ |
265 | - public static function removeStoredToken($client_id) { |
|
265 | + public static function removeStoredToken($client_id){ |
|
266 | 266 | unset(static::$_STORED_TOKENS[$client_id]); |
267 | 267 | return true; |
268 | 268 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | protected $entryPoints = array(); |
62 | 62 | |
63 | 63 | public function __construct($server = '',array $credentials = array()){ |
64 | - if (!empty($server)) { |
|
64 | + if (!empty($server)){ |
|
65 | 65 | $this->setServer($server); |
66 | 66 | } |
67 | 67 | if (!empty($credentials)){ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | /** |
74 | 74 | * @inheritdoc |
75 | 75 | */ |
76 | - public function setServer($server) { |
|
76 | + public function setServer($server){ |
|
77 | 77 | $this->server = $server; |
78 | 78 | $this->apiURL = Helpers::configureAPIURL($this->server); |
79 | 79 | return $this; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * @inheritdoc |
84 | 84 | */ |
85 | - public function getAPIUrl() { |
|
85 | + public function getAPIUrl(){ |
|
86 | 86 | return $this->apiURL; |
87 | 87 | } |
88 | 88 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | /** |
126 | 126 | * @inheritdoc |
127 | 127 | */ |
128 | - public function getServer() { |
|
128 | + public function getServer(){ |
|
129 | 129 | return $this->server; |
130 | 130 | } |
131 | 131 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $implements = class_implements($className); |
158 | 158 | if (is_array($implements) && in_array('SugarAPI\SDK\EntryPoint\Interfaces\EPInterface',$implements)){ |
159 | 159 | $this->entryPoints[$funcName] = $className; |
160 | - }else{ |
|
160 | + } else{ |
|
161 | 161 | throw new EntryPointException($className,'Class must extend SugarAPI\SDK\EntryPoint\Interfaces\EPInterface'); |
162 | 162 | } |
163 | 163 | return $this; |
@@ -176,12 +176,12 @@ discard block |
||
176 | 176 | $EntryPoint = new $Class($this->apiURL, $params); |
177 | 177 | |
178 | 178 | if ($EntryPoint->authRequired()){ |
179 | - if (isset($this->token) && $this->authenticated()) { |
|
179 | + if (isset($this->token) && $this->authenticated()){ |
|
180 | 180 | $EntryPoint->setAuth($this->getToken()->access_token); |
181 | 181 | } |
182 | 182 | } |
183 | 183 | return $EntryPoint; |
184 | - }else{ |
|
184 | + } else{ |
|
185 | 185 | throw new EntryPointException($name,'Unregistered EntryPoint'); |
186 | 186 | } |
187 | 187 | } |
@@ -190,13 +190,13 @@ discard block |
||
190 | 190 | * @inheritdoc |
191 | 191 | * @throws AuthenticationException - When Login request fails |
192 | 192 | */ |
193 | - public function login() { |
|
193 | + public function login(){ |
|
194 | 194 | $EP = new OAuth2Token($this->apiURL); |
195 | 195 | $response = $EP->execute($this->credentials)->getResponse(); |
196 | 196 | if ($response->getStatus()=='200'){ |
197 | 197 | $this->setToken($response->getBody(false)); |
198 | 198 | static::storeToken($this->token,$this->credentials['client_id']); |
199 | - } else { |
|
199 | + } else{ |
|
200 | 200 | $error = $response->getBody(); |
201 | 201 | throw new AuthenticationException("Login Response [".$error['error']."] ".$error['error_message']); |
202 | 202 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | if ($response->getStatus()=='200'){ |
219 | 219 | $this->setToken($response->getBody(false)); |
220 | 220 | static::storeToken($this->token,$this->credentials['client_id']); |
221 | - }else{ |
|
221 | + } else{ |
|
222 | 222 | $error = $response->getBody(); |
223 | 223 | throw new AuthenticationException("Refresh Response [".$error['error']."] ".$error['error_message']); |
224 | 224 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | if ($response->getStatus()=='200'){ |
237 | 237 | unset($this->token); |
238 | 238 | static::removeStoredToken($this->credentials['client_id']); |
239 | - }else{ |
|
239 | + } else{ |
|
240 | 240 | $error = $response->getBody(); |
241 | 241 | throw new AuthenticationException("Logout Response [".$error['error']."] ".$error['message']); |
242 | 242 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | /** |
248 | 248 | * @inheritdoc |
249 | 249 | */ |
250 | - public static function storeToken($token, $client_id) { |
|
250 | + public static function storeToken($token, $client_id){ |
|
251 | 251 | static::$_STORED_TOKENS[$client_id] = $token; |
252 | 252 | return true; |
253 | 253 | } |
@@ -255,14 +255,14 @@ discard block |
||
255 | 255 | /** |
256 | 256 | * @inheritdoc |
257 | 257 | */ |
258 | - public static function getStoredToken($client_id) { |
|
258 | + public static function getStoredToken($client_id){ |
|
259 | 259 | return static::$_STORED_TOKENS[$client_id]; |
260 | 260 | } |
261 | 261 | |
262 | 262 | /** |
263 | 263 | * @inheritdoc |
264 | 264 | */ |
265 | - public static function removeStoredToken($client_id) { |
|
265 | + public static function removeStoredToken($client_id){ |
|
266 | 266 | unset(static::$_STORED_TOKENS[$client_id]); |
267 | 267 | return true; |
268 | 268 | } |
@@ -151,7 +151,7 @@ |
||
151 | 151 | /** |
152 | 152 | * @param $funcName |
153 | 153 | * @param $className |
154 | - * @return bool |
|
154 | + * @return AbstractClient |
|
155 | 155 | * @throws EntryPointException |
156 | 156 | */ |
157 | 157 | public function registerEntryPoint($funcName, $className){ |
@@ -39,7 +39,7 @@ |
||
39 | 39 | public static function getSDKEntryPointRegistry(){ |
40 | 40 | $entryPoints = array(); |
41 | 41 | require __DIR__.DIRECTORY_SEPARATOR.'registry.php'; |
42 | - foreach ($entryPoints as $funcName => $className) { |
|
42 | + foreach ($entryPoints as $funcName => $className){ |
|
43 | 43 | $className = "SugarAPI\\SDK\\EntryPoint\\" . $className; |
44 | 44 | $entryPoints[$funcName] = $className; |
45 | 45 | } |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | * @return string |
16 | 16 | */ |
17 | 17 | public static function configureAPIURL($instance){ |
18 | - if (strpos($instance,"http")===FALSE){ |
|
18 | + if (strpos($instance, "http")===FALSE){ |
|
19 | 19 | $instance = "http://".$instance; |
20 | 20 | } |
21 | - if (strpos($instance,"rest/v10")!==FALSE){ |
|
21 | + if (strpos($instance, "rest/v10")!==FALSE){ |
|
22 | 22 | $instance = str_replace("rest/v10", "", $instance); |
23 | 23 | } |
24 | 24 | return rtrim($instance, "/").self::API_URL; |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | public static function getSDKEntryPointRegistry(){ |
40 | 40 | $entryPoints = array(); |
41 | 41 | require __DIR__.DIRECTORY_SEPARATOR.'registry.php'; |
42 | - foreach ($entryPoints as $funcName => $className) { |
|
43 | - $className = "SugarAPI\\SDK\\EntryPoint\\" . $className; |
|
42 | + foreach ($entryPoints as $funcName => $className){ |
|
43 | + $className = "SugarAPI\\SDK\\EntryPoint\\".$className; |
|
44 | 44 | $entryPoints[$funcName] = $className; |
45 | 45 | } |
46 | 46 | return $entryPoints; |
@@ -8,14 +8,14 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | - $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
|
18 | + $this->setResponse(new JSON($this->Request->getResponse(), $this->Request->getCurlObject())); |
|
19 | 19 | return $this; |
20 | 20 | } |
21 | 21 |
@@ -8,12 +8,12 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = NULL) { |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |
@@ -8,14 +8,14 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | - $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
|
18 | + $this->setResponse(new JSON($this->Request->getResponse(), $this->Request->getCurlObject())); |
|
19 | 19 | return $this; |
20 | 20 | } |
21 | 21 |
@@ -8,12 +8,12 @@ |
||
8 | 8 | |
9 | 9 | abstract class AbstractPostFileEntryPoint extends AbstractEntryPoint { |
10 | 10 | |
11 | - public function __construct($url, array $options = array()) { |
|
11 | + public function __construct($url, array $options = array()){ |
|
12 | 12 | $this->setRequest(new POSTFile()); |
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = null){ |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | parent::__construct($url, $options); |
14 | 14 | } |
15 | 15 | |
16 | - public function execute($data = null) { |
|
16 | + public function execute($data = NULL) { |
|
17 | 17 | parent::execute($data); |
18 | 18 | $this->setResponse(new JSON($this->Request->getResponse(),$this->Request->getCurlObject())); |
19 | 19 | return $this; |