예제 #1
0
파일: Exporter.php 프로젝트: rask/wprsrv
 /**
  * Validate that the reservation to be exported fits into the export date range.
  *
  * @since 0.2.0
  * @access protected
  *
  * @param \Wprsrv\PostTypes\Objects\Reservation $reservation Reservation to
  *                                                           validate.
  *
  * @return Boolean
  */
 protected function reservationIsInDateRange(Reservation $reservation)
 {
     if (empty($this->dateRange)) {
         return true;
     }
     if (isset($this->dateRange['start']) && $reservation->getEndDate('Y-m-d') > $this->dateRange['start']) {
         return false;
     }
     if (isset($this->dateRange['end']) && $reservation->getStartDate('Y-m-d') < $this->dateRange['end']) {
         return false;
     }
     return true;
 }