public function EasyRdf_Serialiser_Rapper::__construct

Constructor

Parameters

string $rapperCmd Optional path to the rapper command to use.:

Return value

object EasyRdf_Serialiser_Rapper

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php, line 59

Class

EasyRdf_Serialiser_Rapper
Class to serialise an EasyRdf_Graph to RDF using the 'rapper' command line tool.

Code

public function __construct($rapperCmd = 'rapper') {
  $result = exec("{$rapperCmd} --version 2>/dev/null", $output, $status);
  if ($status != 0) {
    throw new EasyRdf_Exception("Failed to execute the command '{$rapperCmd}': {$result}");
  }
  else {
    $this->rapperCmd = $rapperCmd;
  }
}