Lemon\RestBundle\Object\Registry::get PHP Method

get() public method

public get ( string $name ) : Definition
$name string
return Definition
    public function get($name)
    {
        if (!$this->has($name)) {
            throw new \InvalidArgumentException(sprintf("Invalid resource \"%s\"", $name));
        }
        return $this->classes[$name];
    }

Usage Example

Example #1
0
 /**
  * @param string $resource
  * @return Manager
  */
 public function create($resource)
 {
     $definition = $this->registry->get($resource);
     return new Manager($this->doctrine, $this->eventDispatcher, $definition);
 }
All Usage Examples Of Lemon\RestBundle\Object\Registry::get