id = (int)$data['id']; } if (isset($data['log_time'])) { try { $logData->logTime = new DateTime($data['log_time']); } catch (Exception $e) { } } if (isset($data['level'])) { $logData->level = (string)$data['level']; } if (isset($data['message'])) { $logData->message = (string)$data['message']; } if (isset($data['class'])) { $logData->class = (string)$data['class']; } if (isset($data['method'])) { $logData->method = (string)$data['method']; } if (isset($data['line'])) { $logData->line = (int)$data['line']; } if (isset($data['origin_type'])) { $logData->originType = (string)$data['origin_type']; } if (isset($data['origin_detail'])) { $logData->originDetail = (string)$data['origin_detail']; } if (isset($data['dump'])) { $logData->dump = (string)$data['dump']; } return $logData; } /** * @return int|null */ public function getId(): ?int { return $this->id; } /** * @return DateTime|null */ public function getLogTime(): ?DateTime { return $this->logTime; } /** * @return string|null */ public function getLevel(): ?string { return $this->level; } /** * @return string|null */ public function getMessage(): ?string { return $this->message; } /** * @return string|null */ public function getClass(): ?string { return $this->class; } /** * @return string|null */ public function getMethod(): ?string { return $this->method; } /** * @return int|null */ public function getLine(): ?int { return $this->line; } /** * @return string|null */ public function getOriginType(): ?string { return $this->originType; } /** * @return string|null */ public function getOriginDetail(): ?string { return $this->originDetail; } /** * @return string|null */ public function getDump(): ?string { return $this->dump; } }