public function getEvents(\DateTime $start_date, \DateTime $end_date, $reset = TRUE) {
    if ($reset || empty($this->itemized_events)) {
      // We first get events in the itemized format
      $this->itemized_events = $this->getEventsItemized($start_date, $end_date);
    }

    // We then normalize those events to create Events that get added to an array
    return $this->getEventsNormalized($start_date, $end_date, $this->itemized_events);
  }
public function getEvents(\DateTime $start_date, \DateTime $end_date, $reset = TRUE) {
    if ($reset || empty($this->itemized_events)) {
      // We first get events in the itemized format
      $this->itemized_events = $this->getEventsItemized($start_date, $end_date);
    }

    // We then normalize those events to create Events that get added to an array
    return $this->getEventsNormalized($start_date, $end_date, $this->itemized_events);
  }
public function getEvents ( \ DateTime $ start_date , \ DateTime $ end_date , $ reset = TRUE ) { if ( $ reset || empty ( $ this -> itemized_events ) ) { // We first get events in the itemized format $ this -> itemized_events = $ this -> getEventsItemized ( $ start_date , $ end_date ) ; } // We then normalize those events to create Events that get added to an array return $ this -> getEventsNormalized ( $ start_date , $ end_date , $ this -> itemized_events ) ; }
Given a start and end time will retrieve events from the defined store.

If unit_ids where defined it will filter for those unit ids.

@param \DateTime $start_date
@param \DateTime $end_date
@param $reset - if set to TRUE we will always refer to the Store to retrieve events

@return array
Given a start and end time will retrieve events from the defined store .