ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Ratio.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Andreas Åkre Solberg <andreas.solberg@uninett.no>
4  * @package SimpleSAMLphp
5  */
7 {
8  protected $refrule1;
9  protected $refrule2;
10 
15  {
16  assert($statconfig instanceof SimpleSAML_Configuration);
17  assert($ruleconfig instanceof SimpleSAML_Configuration);
18 
19  parent::__construct($statconfig, $ruleconfig, $ruleid, $available);
20 
21  $refNames = $this->ruleconfig->getArray('ref');
22 
23  $statrulesConfig = $this->statconfig->getConfigItem('statrules');
24 
25  $statruleConfig1 = $statrulesConfig->getConfigItem($refNames[0]);
26  $statruleConfig2 = $statrulesConfig->getConfigItem($refNames[1]);
27 
28  $this->refrule1 = new sspmod_statistics_Statistics_Rulesets_BaseRule($this->statconfig, $statruleConfig1, $refNames[0], $available);
29  $this->refrule2 = new sspmod_statistics_Statistics_Rulesets_BaseRule($this->statconfig, $statruleConfig2, $refNames[1], $available);
30  }
31 
32  public function availableTimeRes()
33  {
34  return $this->refrule1->availableTimeRes();
35  }
36 
37  public function availableFileSlots($timeres)
38  {
39  return $this->refrule1->availableFileSlots($timeres);
40  }
41 
42  protected function resolveTimeRes($preferTimeRes)
43  {
44  return $this->refrule1->resolveTimeRes($preferTimeRes);
45  }
46 
47  protected function resolveFileSlot($timeres, $preferTime)
48  {
49  return $this->refrule1->resolveFileSlot($timeres, $preferTime);
50  }
51 
53  {
54  return $this->refrule1->getTimeNavigation($timeres, $preferTime);
55  }
56 
58  {
61 
62  $refNames = $this->ruleconfig->getArray('ref');
63 
64  $dataset = new sspmod_statistics_RatioDataset($this->statconfig, $this->ruleconfig, $refNames, $timeres, $fileslot);
65  return $dataset;
66  }
67 }
68 
$fileslot
Definition: showstats.php:78
getTimeNavigation($timeres, $preferTime)
Definition: Ratio.php:52
getDataSet($preferTimeRes, $preferTime)
Definition: Ratio.php:57
$timeres
Definition: showstats.php:77
$preferTimeRes
Definition: showstats.php:15
$preferTime
Definition: showstats.php:14
resolveFileSlot($timeres, $preferTime)
Definition: Ratio.php:47
__construct($statconfig, $ruleconfig, $ruleid, $available)
Constructor.
Definition: Ratio.php:14