public function __set($key, $value) { $ignore = array('_ID'); if ($key === 'status') { $this->old_status = $this->status; } if (!in_array($key, $ignore)) { $this->pending[$key] = $value; } if ('_ID' !== $key) { $this->{$key} = $value; } }