uuid = (string) $data->uuid(); $this->url = (string) $data->url(); $this->type = (string) $data->type(); } public function toArray() { return [ "uuid" => $this->uuid, "url" => $this->url, "type" => $this->type ]; } }