public static function getProductListByDistributer($distributerId) { Result::initializeStaticObjects(); $params = array('do' => 'getProductList', 'distributerId' => $distributerId); $curlResult = Curl::get_data(Config::JSON_URL . ProductList::SERVICE, http_build_query($params), ContentType::header_content_urlencoded); return json_encode($curlResult); }
} function isSuccess() { return strcmp($this->resultCode, ResourceBundle::ResultGuppy001Code) == 0; } /** * * @param type $obj * @return type * * This function removes null values from object */ static function object_unset_nulls($obj) { $arrObj = is_object($obj) ? get_object_vars($obj) : $obj; foreach ($arrObj as $key => $val) { $val = is_array($val) || is_object($val) ? Result::object_unset_nulls($val) : $val; if (is_array($obj)) { $obj[$key] = $val; } else { $obj->{$key} = $val; } if ($val == null) { unset($obj->{$key}); } } return $obj; } } Result::initializeStaticObjects();