api/MarkLogic/MLPHP/Document.php
public function read($uri = null, $params = array())
    {
        $this->uri = (isset($uri)) ? (string)$uri : $this->uri;
        try {
            $params = array_merge(array('uri' => $this->uri), $params);
            $request = new RESTRequest('GET', 'documents', $params);
            $this->response = $this->client->send($request);
            $this->content = $this->response->getBody();
            $this->contentType = $this->response->getContentType();
            return $this->content;
        } catch(\Exception $e) {
            // TODO: error codes for not-found and other reasonable, unexceptional errors.
            $this->logger->warning( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
            return false;
        }
    }
public function read($uri = null, $params = array())
    {
        $this->uri = (isset($uri)) ? (string)$uri : $this->uri;
        try {
            $params = array_merge(array('uri' => $this->uri), $params);
            $request = new RESTRequest('GET', 'documents', $params);
            $this->response = $this->client->send($request);
            $this->content = $this->response->getBody();
            $this->contentType = $this->response->getContentType();
            return $this->content;
        } catch(\Exception $e) {
            // TODO: error codes for not-found and other reasonable, unexceptional errors.
            $this->logger->warning( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
            return false;
        }
    }
Read a document from the database.

@see Document::getContent()

@param string $uri A document URI.
@param array $params Optional additional parameters to pass when reading.
@return string|bool The document content or false on failure.