public function 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

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php, line 240

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];
}