public function get(?string $key = null)
    {
        if (is_null($key)) {
            return $this->metadata;
        }

        if (! array_key_exists($key, $this->metadata)) {
            return null;
        }

        return $this->metadata[$key];
    }
public function get(?string $key = null)
    {
        if (is_null($key)) {
            return $this->metadata;
        }

        if (! array_key_exists($key, $this->metadata)) {
            return null;
        }

        return $this->metadata[$key];
    }
public function get ( ? string $ key = null ) { if ( is_null ( $ key ) ) { return $ this -> metadata ; } if ( ! array_key_exists ( $ key , $ this -> metadata ) ) { return null ; } return $ this -> metadata [ $ key ] ; }
Get metadata from the document.

@param  string|null  $key

@return mixed
Get metadata from the document .