public function EasyRdf_Sparql_Client::insert in Zircon Profile 8.0        
                          
                  
                        Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php \EasyRdf_Sparql_Client::insert()
 
 
File
 
   - vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php, line 182
 
  
  Class
  
  - EasyRdf_Sparql_Client 
 
  - Class for making SPARQL queries using the SPARQL 1.1 Protocol
 
Code
public function insert($data, $graphUri = null) {
  
  $query = 'INSERT DATA {';
  if ($graphUri) {
    $query .= "GRAPH <{$graphUri}> {";
  }
  $query .= $this
    ->convertToTriples($data);
  if ($graphUri) {
    $query .= "}";
  }
  $query .= '}';
  return $this
    ->update($query);
}