ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilTestRandomQuestionSetNonAvailablePool.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
28 {
29  public const UNAVAILABILITY_STATUS_LOST = 'lost';
30  public const UNAVAILABILITY_STATUS_TRASHED = 'trashed';
31 
36 
40  protected $id;
41 
43  protected $ref_id = null;
44 
48  protected $title;
49 
53  protected $path;
54 
58  public function getId(): int
59  {
60  return $this->id;
61  }
62 
66  public function setId($id)
67  {
68  $this->id = $id;
69  }
70 
74  public function getTitle(): string
75  {
76  return $this->title;
77  }
78 
82  public function setTitle($title)
83  {
84  $this->title = $title;
85  }
86 
90  public function getPath(): string
91  {
92  return $this->path;
93  }
94 
98  public function setPath($path)
99  {
100  $this->path = $path;
101  }
102 
106  public function getUnavailabilityStatus(): string
107  {
109  }
110 
115  {
116  $this->unavailabilityStatus = $unavailabilityStatus;
117  }
118 
119  public function getRefId(): ?int
120  {
121  return $this->ref_id;
122  }
123 
124  public function setRefId(?int $ref_id): void
125  {
126  $this->ref_id = $ref_id;
127  }
128 
132  public function assignDbRow($row)
133  {
134  foreach ($row as $field => $value) {
135  switch ($field) {
136  case 'pool_fi': $this->setId($value);
137  break;
138  case 'pool_ref_id': $this->setRefId($value ? (int) $value : null);
139  break;
140  case 'pool_title': $this->setTitle($value);
141  break;
142  case 'pool_path': $this->setPath($value);
143  break;
144  }
145  }
146  }
147 }