Added a has() method to CloudObject
This commit is contained in:
@@ -74,6 +74,13 @@ class CloudObject {
|
|||||||
return $this->node;
|
return $this->node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a property exists on this object.
|
||||||
|
*/
|
||||||
|
public function has($property) : bool {
|
||||||
|
return $this->getReader()->hasProperty($this->node, $property);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of a property as a string.
|
* Get the value of a property as a string.
|
||||||
* If the property has multiple values, only the first is returned.
|
* If the property has multiple values, only the first is returned.
|
||||||
@@ -137,7 +144,6 @@ class CloudObject {
|
|||||||
return $this->retriever->getCloudObject($coid);
|
return $this->retriever->getCloudObject($coid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of a property and, if it's a COID, retrieve the corresponding object node.
|
* Get the value of a property and, if it's a COID, retrieve the corresponding object node.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user