ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.ilTestRandomQuestionSetNonAvailablePool.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
29 public const UNAVAILABILITY_STATUS_LOST = 'lost';
30 public const UNAVAILABILITY_STATUS_TRASHED = 'trashed';
31
32 protected string $unavailability_status;
33 protected int $id;
34 protected ?int $ref_id = null;
35 protected string $title;
36 protected string $path;
37
38 public function getId(): int
39 {
40 return $this->id;
41 }
42
43 public function getTitle(): string
44 {
45 return $this->title;
46 }
47
48 public function getPath(): string
49 {
50 return $this->path;
51 }
52
53 public function setPath(string $path): void
54 {
55 $this->path = $path;
56 }
57
58 public function getUnavailabilityStatus(): string
59 {
61 }
62
63 public function setUnavailabilityStatus(string $unavailability_status): void
64 {
65 $this->unavailability_status = $unavailability_status;
66 }
67
68 public function getRefId(): ?int
69 {
70 return $this->ref_id;
71 }
72
73 public function assignDbRow(array $row): void
74 {
75 foreach ($row as $field => $value) {
76 switch ($field) {
77 case 'pool_fi':
78 $this->id = $value;
79 break;
80 case 'pool_ref_id':
81 $this->ref_id = $value === null
82 ? null
83 : (int) $value;
84 break;
85 case 'pool_title':
86 $this->title = $value;
87 break;
88 case 'pool_path':
89 $this->path = $value;
90 break;
91 }
92 }
93 }
94}