status = $status; $this->collectors = $collectors; } /** * @inheritDoc */ public function collect(): array { $result = []; foreach ($this->collectors as $type => $collector) { $result[$type] = $collector->collect(); } $this->status->switchToMiss(); return $result; } /** * @inheritDoc */ public function hasNewData(): bool { return $this->status->check(); } }