protected function EasyRdf_Serialiser::reversePropertyCount in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser.php \EasyRdf_Serialiser::reversePropertyCount()
Protected method to get the number of reverse properties for a resource If a resource only has a single property, the number of values for that property is returned instead. @ignore
3 calls to EasyRdf_Serialiser::reversePropertyCount()
- EasyRdf_Serialiser_RdfXml::rdfxmlObject in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ RdfXml.php - Protected method to serialise an object node into an XML object @ignore
- EasyRdf_Serialiser_Turtle::serialiseProperties in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ Turtle.php - Protected method to serialise the properties of a resource @ignore
- EasyRdf_Serialiser_Turtle::serialiseSubjects in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser/ Turtle.php - @ignore
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Serialiser.php, line 94
Class
- EasyRdf_Serialiser
- Parent class for the EasyRdf serialiser
Code
protected function reversePropertyCount($resource) {
$properties = $resource
->reversePropertyUris();
$count = count($properties);
if ($count == 1) {
$property = $properties[0];
return $resource
->countValues("^<{$property}>");
}
else {
return $count;
}
}