예제 #1
0
 /**
  * @deprecated
  *
  */
 public static function getScheduleFlownCounts($code, $flightnum, $days = 7)
 {
     $max = 0;
     $code = strtoupper($code);
     $flightnum = strtoupper($flightnum);
     $start = strtotime("- {$days} days");
     $end = time();
     $data = array();
     # Turn on caching:
     DB::enableCache();
     do {
         $count = PIREPData::getReportCountForRoute($code, $flightnum, $start);
         $date = date('m-d', $start);
         $data[$date] = $count;
         $start += SECONDS_PER_DAY;
     } while ($start <= $end);
     DB::disableCache();
     return $data;
 }