You are here

public function Profiler::get in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Profiler/Profiler.php \Symfony\Component\HttpKernel\Profiler\Profiler::get()

Gets a Collector by name.

Parameters

string $name A collector name:

Return value

DataCollectorInterface A DataCollectorInterface instance

Throws

\InvalidArgumentException if the collector does not exist

File

vendor/symfony/http-kernel/Profiler/Profiler.php, line 273

Class

Profiler
Profiler.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

public function get($name) {
  if (!isset($this->collectors[$name])) {
    throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name));
  }
  return $this->collectors[$name];
}