Check and cleanup parameters passed to serialise() method @ignore
protected function checkSerialiseParams(&$graph, &$format) {
if ($graph == null or !is_object($graph) or get_class($graph) != 'EasyRdf_Graph') {
throw new InvalidArgumentException("\$graph should be an EasyRdf_Graph object and cannot be null");
}
if ($format == null or $format == '') {
throw new InvalidArgumentException("\$format cannot be null or empty");
}
elseif (is_object($format) and get_class($format) == 'EasyRdf_Format') {
$format = $format
->getName();
}
elseif (!is_string($format)) {
throw new InvalidArgumentException("\$format should be a string or an EasyRdf_Format object");
}
}