public function __set($name, $value) { if ($this->isArray($value)) { $value = new static($value); } if ($this->isNull($name)) { $this->eventData[] = $value; } else { $this->eventData[$name] = $value; } }