public function __set($property, $value) { if (property_exists($this, $property)) { $this->{$property} = $value; } }