public function collection(string $path = ''): CollectionReference
    {
        try {
            return new CollectionReference(Uri::resolve($this->uri, $path), $this->client);
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function collection(string $path = ''): CollectionReference
    {
        try {
            return new CollectionReference(Uri::resolve($this->uri, $path), $this->client);
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function collection ( string $ path = '' ) : CollectionReference { try { return new CollectionReference ( Uri :: resolve ( $ this -> uri , $ path ) , $ this -> client ) ; } catch ( \ InvalidArgumentException $ e ) { throw new InvalidArgumentException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Returns a collection.

@param string $name

@throws InvalidArgumentException

@return Reference
Returns a collection .