api/MarkLogic/MLPHP/Options.php
public function write($name = null)
    {
        $name = $name ? $name : $this->name;
        try {
            $params = array('format' => 'xml');
            $headers = array('Content-type' => 'application/xml');
            $request = new RESTRequest('PUT', 'config/query/' . $name, $params, $this->getAsXML(), $headers);
            $this->response = $this->client->send($request);
            return $this;
        } catch(Exception $e) {
            echo $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() . PHP_EOL;
        }
    }
public function write($name = null)
    {
        $name = $name ? $name : $this->name;
        try {
            $params = array('format' => 'xml');
            $headers = array('Content-type' => 'application/xml');
            $request = new RESTRequest('PUT', 'config/query/' . $name, $params, $this->getAsXML(), $headers);
            $this->response = $this->client->send($request);
            return $this;
        } catch(Exception $e) {
            echo $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() . PHP_EOL;
        }
    }
Write the query options to the database.

@param string $name The query options name.
@return Options $this