api/MarkLogic/MLPHP/Document.php
public function readMetadata()
    {
        try {
            $params = array('uri' => $this->uri, 'category' => 'metadata');
            $request = new RESTRequest('GET', 'documents', $params);
            $this->response = $this->client->send($request);
            $metadata = new Metadata();
            $metadata->loadFromXML($this->response->getBody());
            return $metadata;
        } catch(\Exception $e) {
            $this->logger->error( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
            return null;
        }
    }
public function readMetadata()
    {
        try {
            $params = array('uri' => $this->uri, 'category' => 'metadata');
            $request = new RESTRequest('GET', 'documents', $params);
            $this->response = $this->client->send($request);
            $metadata = new Metadata();
            $metadata->loadFromXML($this->response->getBody());
            return $metadata;
        } catch(\Exception $e) {
            $this->logger->error( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
            return null;
        }
    }
Read document metadata from the database.

@return Metadata A Metadata object.