public function EasyRdf_Resource::count

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

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php, line 441

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

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