public function getRepository($key)
    {
        $repository = $this->tryGetRepository($key);
        if ($repository === null) {
            throw new \OutOfBoundsException($key.' does not exist in the registry');
        }
        return $repository;
    }
public function getRepository($key)
    {
        $repository = $this->tryGetRepository($key);
        if ($repository === null) {
            throw new \OutOfBoundsException($key.' does not exist in the registry');
        }
        return $repository;
    }
public function getRepository ( $ key ) { $ repository = $ this -> tryGetRepository ( $ key ) ; if ( $ repository === null ) { throw new \ OutOfBoundsException ( $ key . ' does not exist in the registry' ) ; } return $ repository ; }
Returns the repository if it is registered in the map, throws exception otherwise

@param   string      $key        The key
@return  RepositoryInterface
@throws  \OutOfBoundsException   If the key does not exist
Returns the repository if it is registered in the map throws exception otherwise