// TODO: may want to clear from $_transientValues. (Won't be user-visible.)
$this->_values[$k]=$v;
if(!self::$_permanentAttributes->includes($k))
$this->_unsavedValues->add($k);
}
publicfunction__isset($k)
{
returnisset($this->_values[$k]);
}
publicfunction__unset($k)
{
unset($this->_values[$k]);
$this->_transientValues->add($k);
$this->_unsavedValues->discard($k);
}
publicfunction__get($k)
{
if(isset($this->_values[$k])){
return$this->_values[$k];
}elseif($this->_transientValues->includes($k)){
$class=get_class($this);
$attrs=join(', ',array_keys($this->_values));
error_log("Stripe Notice: Undefined property of $class instance: $k. HINT: The $k attribute was set in the past, however. It was then wiped when refreshing the object with the result returned by Stripe's API, probably as a result of a save(). The attributes currently available on this object are: $attrs");
returnnull;
}else{
$class=get_class($this);
error_log("Stripe Notice: Undefined property of $class instance: $k");