Files
Martin Slachta 0d829845c4 initial
2026-06-11 19:03:29 +02:00

39 lines
829 B
PHP

<?php
class RsvFormSubmitResult {
private array $errors = [];
private array $values = [];
public function addError(string $elementName, string $code, string $message): void {
$this->errors[] = [
'element' => $elementName,
'code' => $code,
'message' => $message
];
}
public function hasErrors(): bool {
return count($this->errors) > 0;
}
public function getErrors(): array {
return $this->errors;
}
public function setValue(string $name, $value): void {
$this->values[$name] = $value;
}
public function getValue(string $name) {
return $this->values[$name] ?? null;
}
public function getValues(): array {
return $this->values;
}
public function toDto(): array {
}
}