16 private static $reportsList = array();
17 private static $indices = array(
18 'categories' => array(),
20 'dataType' => array(),
21 'reportClassName' => array()
23 private static $called =
false;
30 return Common::EVENT_REPORT_COLLECT;
39 return $this->isCalled() ? self::$reportsList :
false;
47 return $this->isCalled() ? self::$indices :
false;
55 return $this->isCalled() ? self::$indices[
'categories'] :
false;
63 return $this->isCalled() ? self::$indices[
'unit'] :
false;
71 return $this->isCalled() ? self::$indices[
'dataType'] :
false;
78 public function call()
84 foreach ($reports as $key => $report)
86 self::$reportsList[$key] = $report;
87 self::$indices[
'categories'][$report->getCategoryKey()][] = $key;
88 self::$indices[
'reportClassName'][$report::getClassName()][] = $key;
89 self::$indices[
'unit'][$report->getUnitKey()][] = $key;
90 foreach ($report->getReportImplementedDataTypes() as $dataType)
92 self::$indices[
'dataType'][$dataType][] = $key;
103 private function isCalled()
107 $this->errors[] =
new Error(
'invoke call method manager before get some parameters');