コード例 #1
0
ファイル: StatDataset.php プロジェクト: SysBind/simplesamlphp
 public function calculateMax()
 {
     $maxvalue = 0;
     foreach ($this->results as $slot => &$res) {
         if (!array_key_exists($this->delimiter, $res)) {
             $res[$this->delimiter] = 0;
         }
         $maxvalue = max($res[$this->delimiter], $maxvalue);
     }
     $this->max = sspmod_statistics_Graph_GoogleCharts::roof($maxvalue);
 }
コード例 #2
0
 public function calculateMax()
 {
     /*
      * Get rule specific configuration from the configuration file.
      */
     $slotsize = $this->ruleconfig->getValue('slot');
     $dateformat_period = $this->timeresconfig->getValue('dateformat-period');
     $dateformat_intra = $this->timeresconfig->getValue('dateformat-intra');
     $maxvalue = 0;
     $maxvaluetime = NULL;
     foreach ($this->results as $slot => &$res) {
         if (!array_key_exists($this->delimiter, $res)) {
             $res[$this->delimiter] = 0;
         }
         if ($res[$this->delimiter] > $maxvalue) {
             $maxvaluetime = $this->datehandlerTick->prettyDateSlot($slot, $slotsize, $dateformat_intra);
         }
         $maxvalue = max($res[$this->delimiter], $maxvalue);
     }
     $this->max = sspmod_statistics_Graph_GoogleCharts::roof($maxvalue);
 }