protected function EasyRdf_Serialiser::checkSerialiseParams in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser.php \EasyRdf_Serialiser::checkSerialiseParams()
Check and cleanup parameters passed to serialise() method @ignore
9 calls to EasyRdf_Serialiser::checkSerialiseParams()
- EasyRdf_Serialiser_Arc::serialise in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ Arc.php - Serialise an EasyRdf_Graph into RDF format of choice.
- EasyRdf_Serialiser_GraphViz::serialise in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ GraphViz.php - Serialise an EasyRdf_Graph into a GraphViz dot document.
- EasyRdf_Serialiser_Json::serialise in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ Json.php - Method to serialise an EasyRdf_Graph to RDF/JSON
- EasyRdf_Serialiser_JsonLd::serialise in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ JsonLd_real.php - EasyRdf_Serialiser_Ntriples::serialise in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ Ntriples.php - Serialise an EasyRdf_Graph into N-Triples
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser.php, line 67
Class
- EasyRdf_Serialiser
- Parent class for the EasyRdf serialiser
Code
protected function checkSerialiseParams(&$graph, &$format) {
if (is_null($graph) or !is_object($graph) or !$graph instanceof EasyRdf_Graph) {
throw new InvalidArgumentException("\$graph should be an EasyRdf_Graph object and cannot be null");
}
if (is_null($format) or $format == '') {
throw new InvalidArgumentException("\$format cannot be null or empty");
}
elseif (is_object($format) and $format instanceof EasyRdf_Format) {
$format = $format
->getName();
}
elseif (!is_string($format)) {
throw new InvalidArgumentException("\$format should be a string or an EasyRdf_Format object");
}
}