metrics) { $metrics = $this->getOption(self::OPTION_METRICS); foreach ($metrics as $metric) { $this->propagate($metric); } $this->metrics = $metrics; } return $this->metrics; } public function collect() { foreach ($this->getMetrics() as $metric) { $metric->collect(); } } /** * @param $metricName * @return null|abstractMetrics * @throws InconsistencyConfigException */ public function getOneMetric($metricName) { $metrics = $this->getMetrics(); if (array_key_exists($metricName, $metrics)) { $result = $metrics[$metricName]; } else { throw new InconsistencyConfigException('Attempt to access unknown metric detected' . $metricName); } return $result; } }