Gets a Collector by name.
string $name A collector name:
\InvalidArgumentException if the collector does not exist
public function get(string $name) : DataCollectorInterface { if (!isset($this->collectors[$name])) { throw new \InvalidArgumentException(\sprintf('Collector "%s" does not exist.', $name)); } return $this->collectors[$name]; }