EasyPost\Object::__set PHP Method

__set() public method

Standard accessor magic methods
public __set ( string $k, mixed $v )
$k string
$v mixed
    public function __set($k, $v)
    {
        $this->_values[$k] = $v;
        $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);
                $current->_unsavedValues[$first_key] = $param[$first_key];
                break;
            }
            $i++;
        }
    }