19 assert(
$ruleconfig instanceof SimpleSAML_Configuration);
24 $this->available = null;
36 $timeresConfigs = $this->statconfig->getValue(
'timeres');
37 $available_times = array();
38 foreach ($timeresConfigs as $tres => $tresconfig) {
39 if (array_key_exists($tres, $this->available)) {
40 $available_times[$tres] = $tresconfig[
'name'];
43 return $available_times;
48 $timeresConfigs = $this->statconfig->getValue(
'timeres');
49 $timeresConfig = $timeresConfigs[
$timeres];
51 if (isset($timeresConfig[
'customDateHandler']) && $timeresConfig[
'customDateHandler'] ==
'month') {
60 $available_times = array();
61 foreach ($this->available[
$timeres] as $slot) {
62 $available_times[$slot] = $datehandler->
prettyHeader($slot, $slot + 1, $timeresConfig[
'fileslot'], $timeresConfig[
'dateformat-period']);
64 return $available_times;
69 $timeresavailable = array_keys($this->available);
84 if (in_array(
$preferTime, $this->available[$timeres],
true)) {
95 $available_times_prev = null;
96 $available_times_next = null;
98 $timeslots = array_values($this->available[
$timeres]);
99 sort($timeslots, SORT_NUMERIC);
100 $timeslotindex = array_flip($timeslots);
103 $available_times_prev = $timeslots[$timeslotindex[
$fileslot] - 1];
105 if ($timeslotindex[
$fileslot] < (count($timeslotindex) - 1)) {
106 $available_times_next = $timeslots[$timeslotindex[
$fileslot] + 1];
108 return array(
'prev' => $available_times_prev,
'next' => $available_times_next);
__construct($statconfig, $ruleconfig, $ruleid, $available)
Constructor.
getDataSet($preferTimeRes, $preferTime)
getTimeNavigation($timeres, $preferTime)
resolveTimeRes($preferTimeRes)
prettyHeader($from, $to, $slotsize, $dateformat)
availableFileSlots($timeres)
resolveFileSlot($timeres, $preferTime)