ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Result.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ILIAS\MetaData\Vocabularies\Controlled\RepositoryInterface as ControlledVocabsRepository;
24 
25 class 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 }