isObjectValid($this); } catch (\ReflectionException $e) { return false; } } public function toArray(): array { return get_object_vars($this); } }