From a6e671193ec0fe2caa25531e8e8f0586351c2b36 Mon Sep 17 00:00:00 2001 From: "Kamshory, MT" Date: Wed, 10 Dec 2025 08:04:46 +0700 Subject: [PATCH] Bug fix SercerObject::retrieve, add SercerObject::hasValue --- src/SecretObject.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/SecretObject.php b/src/SecretObject.php index 98b1bdf..e00c0e9 100644 --- a/src/SecretObject.php +++ b/src/SecretObject.php @@ -1286,6 +1286,20 @@ public function validate( return $this; } + /** + * Check if a property has a value set. + * + * This method checks if the specified property is set (exists and has a value). It returns true if the property exists and has a value, and false otherwise. + * + * @param string $propertyName The name of the property to check. + * @return bool true if the property is set, false otherwise. + */ + public function hasValue($propertyName) + { + $var = PicoStringUtil::camelize($propertyName); + return isset($this->{$var}); + } + /** * Retrieves a value from a nested object using a series of keys. *