EasyPost\Object::__unset PHP Method

__unset() public method

unset magic method
public __unset ( string $k )
$k string
    public function __unset($k)
    {
        if (!in_array($k, $this->_immutableValues)) {
            unset($this->_values[$k]);
            $i = 0;
            $current = $this;
            $param = array($k => $v);
            while (true && $i < 99) {
                if (!is_null($current->_parent)) {
                    $param = array($current->_name => $param);
                    $current = $current->_parent;
                } else {
                    reset($param);
                    $first_key = key($param);
                    unset($current->_unsavedValues[$first_key]);
                    break;
                }
                $i++;
            }
        }
    }