You are here

public function Profile::getCollector in Zircon Profile 8

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

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/Profile.php, line 234

Class

Profile
Profile.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

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