data = $data; $this->writeLog = $writeLog && $code !== -1; parent::__construct($msg, $code); } /** * @return array */ public function getData(): array { return $this->data; } /** * @return bool */ public function isWriteLog(): bool { return $this->writeLog; } }