|
@@ -136,7 +136,7 @@ class Webservice
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param string $webservice
|
|
|
+ * @param string $url
|
|
|
* @param array $filters
|
|
|
* @param array $order_by
|
|
|
* @param integer $limit
|
|
@@ -144,21 +144,16 @@ class Webservice
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
- public function getData($webservice, $filters = array(), $order_by = array(), $limit = null, $offset = null)
|
|
|
+ public function getData($url, $filters = array(), $order_by = array(), $limit = null, $offset = null)
|
|
|
{
|
|
|
- if ($this->serviceContainer->hasParameter($webservice)) {
|
|
|
- $url = $this->buildUrl($webservice, $filters, $order_by, $limit, $offset);
|
|
|
- $data = array();
|
|
|
- try {
|
|
|
- $data = json_decode($this->makeGetRequest($url), true);
|
|
|
- } catch (\Exception $ex) {
|
|
|
-
|
|
|
- }
|
|
|
+ $data = array();
|
|
|
+ try {
|
|
|
+ $url = $this->buildUrl($url, $filters, $order_by, $limit, $offset);
|
|
|
+ $data = json_decode($this->makeGetRequest($url), true);
|
|
|
+ } catch (\Exception $ex) {}
|
|
|
|
|
|
- return $data;
|
|
|
- }
|
|
|
+ return $data;
|
|
|
|
|
|
- return array();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -176,8 +171,7 @@ class Webservice
|
|
|
try {
|
|
|
$url = $this->buildUrl($url, $filters, $order_by, $limit, $offset);
|
|
|
$data = json_decode($this->makeRequest($url), true);
|
|
|
- } catch (\Exception $ex) {
|
|
|
- }
|
|
|
+ } catch (\Exception $ex) {}
|
|
|
|
|
|
return $data;
|
|
|
}
|