Ejemplo n.º 1
0
Archivo: Main.php Proyecto: arbi/MyCode
 /**
  * @param int $rateId
  * @param string $dateFrom
  * @param string $dateTo
  * @return array
  */
 public function getRateDataByRateIdDates($rateId, $dateFrom, $dateTo)
 {
     $inventoryDao = new Inventory($this->getServiceLocator(), '\\ArrayObject');
     $rates = $inventoryDao->getRateDataByRateIdDates($rateId, $dateFrom, $dateTo);
     $ratesData = [];
     foreach ($rates as $rate) {
         $ratesData[$rate['date']] = ['apartment_id' => $rate['apartment_id'], 'room_id' => $rate['room_id'], 'rate_name' => $rate['rate_name'], 'price' => $rate['price'], 'date' => $rate['date'], 'capacity' => $rate['capacity'], 'rate_id' => $rate['rate_id']];
     }
     return $ratesData;
 }