Flow\JSONPath\AccessHelper::unsetValue PHP Method

unsetValue() public static method

public static unsetValue ( &$collection, $key )
    public static function unsetValue(&$collection, $key)
    {
        if (is_object($collection) && !$collection instanceof \ArrayAccess) {
            unset($collection->{$key});
        } else {
            unset($collection[$key]);
        }
    }

Usage Example

Example #1
0
 public function offsetUnset($offset)
 {
     AccessHelper::unsetValue($this->data, $offset);
 }