/** * Create or replace the data in a graph. * @param string $graph : name of the graph * @param string $turtle : list of the triples * @return boolean : true if it did * @access public */ public function set($graph, $turtle) { $client = new Curl_HTTP_Client(); $headers = array('Content-Type: application/x-turtle'); $sUri = $this->_endpoint . $graph; $response = $client->send_put_data($sUri, $headers, $turtle); $code = $client->get_http_response_code(); if ($code == 201) { return true; } else { $datastr = print_r($turtle, true); $headerstr = print_r($headers, true); $this->errorLog("Set:\nHeader :" . $headerstr . "\n Data:" . $datastr, $sUri, $code, $response); return false; } }