/** * @param $process * @param null $subject * @return array —писок массивов данных * @throws \Exception */ private function _getCollectorFixes($process, $subject = null) { if (!$this->_currentDutyCollector) { throw new \Exception('Duty collector not exists'); } $fixes = $this->_currentDutyCollector->getFixesData(self::VERSION); $res = array(); foreach ($fixes as $fixData) { $fixData['process'] == $process && ($subject && $fixData['subject'] == $subject || !$subject) && ($res[] = $fixData); } return $res; }