public function get($name)
    {
        if ($this->exists($name)) {
            return $this->container[$name];
        } else {
            throw new RuntimeException(sprintf('Attempted to retrieve non-existing dependency "%s"', $name));
        }
    }
public function get($name)
    {
        if ($this->exists($name)) {
            return $this->container[$name];
        } else {
            throw new RuntimeException(sprintf('Attempted to retrieve non-existing dependency "%s"', $name));
        }
    }
public function get ( $ name ) { if ( $ this -> exists ( $ name ) ) { return $ this -> container [ $ name ] ; } else { throw new RuntimeException ( sprintf ( 'Attempted to retrieve non-existing dependency "%s"' , $ name ) ) ; } }
Returns a service by its name

@param string $name
@throws \RuntimeException If attempted to get non-existing service
@return object
Returns a service by its name