From de355ff2f9ffbeebc048c4b153322405cb7c25ae Mon Sep 17 00:00:00 2001 From: Lukas Rosenstock Date: Fri, 15 May 2026 11:22:15 +0000 Subject: [PATCH] Added a has() method to CloudObject --- CloudObjects/SDK/CloudObject.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CloudObjects/SDK/CloudObject.php b/CloudObjects/SDK/CloudObject.php index 3d9f806..c4da858 100644 --- a/CloudObjects/SDK/CloudObject.php +++ b/CloudObjects/SDK/CloudObject.php @@ -74,6 +74,13 @@ class CloudObject { 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. * If the property has multiple values, only the first is returned. @@ -137,7 +144,6 @@ class CloudObject { return $this->retriever->getCloudObject($coid); } - /** * Get the value of a property and, if it's a COID, retrieve the corresponding object node. */