public function __set($key, $value) { if ($this->parentIsSet($key)) { $this->parentSet($key, $value); } else { $this->data[$key] = $value; } }