Obj
Less than 1 minute
Obj
Object Utility.
class ObjThis class provides a number of utility functions for working with objects.
Methods
replaceProperty
Replaces a property in an object at key with another value.
public replaceProperty(\stdClass $target, array|string $key, mixed $value): boolReturns: bool
This allows a property in am object to be replaced. Normally this would not be difficult, unless the target property is an nth level deep object. This function allows that property to be targeted with a key name in dot-notation.
Parameters
| Parameter | Type | Description |
|---|---|---|
$target | stdClass | The target in which the property will be replaced |
$key | array | string |
$value | mixed | The value that will be used as the replacement |
merge
Object Merge.
public merge(mixed $objects): ?objectReturns: object
Performs a similar operation to array_merge() except works with objects. ANY objects. 😉
Parameters
| Parameter | Type | Description |
|---|---|---|
$objects | mixed |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000