You are here

public function EasyRdf_Resource::countValues in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php \EasyRdf_Resource::countValues()

Count the number of values for a property of a resource

This method will return 0 if the property does not exist.

Parameters

string $property The name of the property (e.g. foaf:name):

string $type The type of value to filter by (e.g. literal):

string $lang The language to filter by (e.g. en):

Return value

integer The number of values associated with the property

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php, line 456

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function countValues($property, $type = null, $lang = null) {
  $this
    ->checkHasGraph();
  return $this->graph
    ->countValues($this->uri, $property, $type, $lang);
}