public function EasyRdf_Serialiser_Rapper::__construct in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Rapper.php \EasyRdf_Serialiser_Rapper::__construct()
Constructor
Parameters
string $rapperCmd Optional path to the rapper command to use.:
Return value
object EasyRdf_Serialiser_Rapper
Overrides EasyRdf_Serialiser::__construct
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ Rapper.php, line 58
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;
}
}