Skip to content

Commit fa4510a

Browse files
authored
Merge pull request #175 from Planetbiru/feature/version-3.22.0
Bug fix SercerObject::retrieve, add SercerObject::hasValue
2 parents 1540d7e + a6e6711 commit fa4510a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/SecretObject.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,20 @@ public function validate(
12861286
return $this;
12871287
}
12881288

1289+
/**
1290+
* Check if a property has a value set.
1291+
*
1292+
* 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.
1293+
*
1294+
* @param string $propertyName The name of the property to check.
1295+
* @return bool true if the property is set, false otherwise.
1296+
*/
1297+
public function hasValue($propertyName)
1298+
{
1299+
$var = PicoStringUtil::camelize($propertyName);
1300+
return isset($this->{$var});
1301+
}
1302+
12891303
/**
12901304
* Retrieves a value from a nested object using a series of keys.
12911305
*

0 commit comments

Comments
 (0)