You are here

public function EasyRdf_Resource::hasProperty in Zircon Profile 8.0

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

Check to see if a property exists for this resource.

This method will return true if the property exists. If the value parameter is given, then it will only return true if the value also exists for that property.

Parameters

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

mixed $value An optional value of the property:

Return value

bool True if value the property exists.

6 calls to EasyRdf_Resource::hasProperty()
EasyRdf_Collection::valid in vendor/easyrdf/easyrdf/lib/EasyRdf/Collection.php
Checks if current position is valid
EasyRdf_Container::append in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Append an item to the end of the container
EasyRdf_Container::count in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Counts the number of items in the container
EasyRdf_Container::offsetExists in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Array Access: check if a position exists in container using array syntax
EasyRdf_Container::seek in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Seek to a specific position in the container

... See full list

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function hasProperty($property, $value = null) {
  $this
    ->checkHasGraph();
  return $this->graph
    ->hasProperty($this->uri, $property, $value);
}