Serialise an EasyRdf_Graph into a GraphViz dot document.
Supported output format names: dot, gif, png, svg
string $graph An EasyRdf_Graph object.:
string $format The name of the format to convert to.:
string The RDF in the new desired format.
Overrides EasyRdf_Serialiser::serialise
public function serialise($graph, $format) {
parent::checkSerialiseParams($graph, $format);
switch ($format) {
case 'dot':
return $this
->serialiseDot($graph);
case 'png':
case 'gif':
case 'svg':
return $this
->renderImage($graph, $format);
default:
throw new EasyRdf_Exception("EasyRdf_Serialiser_GraphViz does not support: {$format}");
}
}