ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Result.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
25class Result
26{
30 protected array $errors;
31
32 public function __construct(
33 string ...$errors
34 ) {
35 $this->errors = $errors;
36 }
37
38 public function wasSuccessful(): bool
39 {
40 if (empty($this->errors)) {
41 return true;
42 }
43 return false;
44 }
45
49 public function getErrors(): array
50 {
51 return $this->errors;
52 }
53}