protected function modelGetCustomersList($strSearchString = '') { ini_set("soap.wsdl_cache_enabled", "0"); $objClient = new soapclient($this->strApiUrl); if ($strSearchString != '') { $arrSOAPFilter[] = array('field' => 'company', 'operator' => 'like', 'value' => $strSearchString); } $arrSOAPSort = array('field' => 'company', 'direction' => 'asc'); $customers = $objClient->getCustomers($this->strApiKey, $arrSOAPFilter, $arrSOAPSort, 999999, 0); if ($customers['status']->code == 0) { foreach ((array) $customers['result'] as $key => $value) { $arrSort[$value->id] = strtolower($value->companylabel); $arrReturnTmp[$value->id] = $value->companylabel; } if (is_array($arrSort)) { asort($arrSort); } foreach ((array) $arrSort as $key => $value) { $arrReturn[$key] = $arrReturnTmp[$key]; } return $arrReturn; } $this->setError($customers['status']->message); return false; }