Added a has() method to CloudObject

This commit is contained in:
2026-05-15 11:22:15 +00:00
parent 7d8ece0df1
commit de355ff2f9

View File

@@ -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.
*/ */