protected function parameters() { $parameters = array_merge(parent::parameters(), array('orderby' => 'starttime', 'sortorder' => 'a', 'singleevents' => 'true')); if ($startDate = $this->getOption('startDate')) { $parameters['start-min'] = $startDate->format('c'); } if ($endDate = $this->getOption('endDate')) { $parameters['start-max'] = $endDate->format('c'); } return $parameters; }
public function parameters() { $parameters = parent::parameters(); switch ($this->getOption('action')) { case 'userCalendars': $parameters['alt'] = 'jsonc'; break; case 'resources': $parameters['alt'] = 'json'; break; default: throw new KurogoException("Unknown action " . $this->getOption('action')); } return $parameters; }