public function get($name) { if (!$this->has($name)) { throw new \InvalidArgumentException(sprintf("Invalid resource \"%s\"", $name)); } return $this->classes[$name]; }
/** * @param string $resource * @return Manager */ public function create($resource) { $definition = $this->registry->get($resource); return new Manager($this->doctrine, $this->eventDispatcher, $definition); }