name = (string) $author->name(); $this->email = (string) $author->email(); $this->uuid = (string) $author->uuid(); $this->role = (string) $author->role(); } public function toArray() { return [ "name" => $this->name, "email" => $this->email, "uuid" => $this->uuid, "role" => $this->role, ]; } }