public function getReference(string $path = null): Reference
    {
        try {
            return new Reference($this->uri->withPath($path ?? ''), $this->client);
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function getReference(string $path = null): Reference
    {
        try {
            return new Reference($this->uri->withPath($path ?? ''), $this->client);
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function getReference ( string $ path = null ) : Reference { try { return new Reference ( $ this -> uri -> withPath ( $ path ?? '' ) , $ this -> client ) ; } catch ( \ InvalidArgumentException $ e ) { throw new InvalidArgumentException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Returns a Reference to the root or the specified path.

@see https://firebase.google.com/docs/reference/js/firebase.database.Database#ref

@param string $path

@throws InvalidArgumentException

@return Reference
Returns a Reference to the root or the specified path .