data = (object) []; } public function getRaw() : StdClass { return ObjectUtil::clone($this->data); } /** * @return ?mixed */ public function get(string $name) { return $this->getRaw()->$name ?? null; } public function has(string $name) : bool { return property_exists($this->data, $name); } public static function fromRaw(StdClass $data) : self { $obj = new self(); $obj->data = $data; return $obj; } }