Example #1
0
 /**
  * @param \ArrayObject|array[] $currencies
  */
 protected function setCurrencies($currencies)
 {
     $this->currencies = $currencies;
     if ($currencies->count()) {
         foreach ($currencies as $currency) {
             $this->currenciesOptimized[$currency['id']] = $currency['value'];
         }
     }
 }
Example #2
0
 /**
  * @param ResultSet|array[] $cities
  * @return array
  */
 private function getCityListAsArray($cities)
 {
     $cityList = ['-- All Cities --'];
     if ($cities->count()) {
         foreach ($cities as $city) {
             $cityList[$city['id']] = $city['name'];
         }
     }
     return $cityList;
 }