コード例 #1
0
 public function autoComplete($dbAdapter, $field, $value, $orderBy, $gatewayName)
 {
     $querySet = GatewayInterface::retrieveQuerySetBy($dbAdapter, $field, $value, $orderBy, $gatewayName);
     $countries = array();
     foreach ($querySet as $qs) {
         $current = json_decode(json_encode($qs), true);
         array_push($countries, $current['country']['countryName']);
     }
     return $this->render($countries);
 }
コード例 #2
0
 private function addCountryName($dbAdapter, $querySet)
 {
     $current = json_decode(json_encode($querySet), true);
     $country = GatewayInterface::retrieveQuerySetBy($dbAdapter, 'fipsCountryCode', $current['visit']['country_code'], 'fipsCountryCode', 'country');
     if (count($country) > 0) {
         $country = json_decode(json_encode($country[0]), true);
         $country_name = $country['country']['countryName'];
         $current['visit']['countryName'] = $country_name;
     } else {
         $current['visit']['countryName'] = 'N/A';
     }
     return $current;
 }
コード例 #3
0
 public function getBy($dbAdapter, $field, $value, $orderBy, $gatewayName)
 {
     $querySet = GatewayInterface::retrieveQuerySetBy($dbAdapter, $field, $value, $orderBy, $gatewayName);
     return $this->render($querySet);
 }