您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

34 行
662B

  1. <?php
  2. namespace Framework\Validation\Exception;
  3. use InvalidArgumentException;
  4. class ValidationException extends InvalidArgumentException
  5. {
  6. protected array $errors = [];
  7. protected string $sessionName = 'errors';
  8. public function setErrors(array $errors): static
  9. {
  10. $this->errors = $errors;
  11. return $this;
  12. }
  13. public function getErrors(): array
  14. {
  15. return $this->errors;
  16. }
  17. public function setSessionName(string $sessionName): static
  18. {
  19. $this->sessionName = $sessionName;
  20. return $this;
  21. }
  22. public function getSessionName(): string
  23. {
  24. return $this->sessionName;
  25. }
  26. }

Powered by TurnKey Linux.