ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilAssQuestionAssignedSkillList.php
Go to the documentation of this file.
1 <?php
2 
26 {
27  protected array $skills = [];
28 
29  public function addSkill(int $skill_base_id, int $skill_ref_id): void
30  {
31  $this->skills[] = "{$skill_base_id}:{$skill_ref_id}";
32  }
33 
34  public function skillsExist(): bool
35  {
36  return (bool) count($this->skills);
37  }
38 
39  public function current(): ?string
40  {
41  $current = current($this->skills);
42  return $current !== false ? $current : null;
43  }
44 
45  public function next(): void
46  {
47  next($this->skills);
48  }
49 
50  public function key(): ?int
51  {
52  return key($this->skills);
53  }
54 
55  public function valid(): bool
56  {
57  $res = key($this->skills);
58  return $res !== null;
59  }
60 
61  public function rewind(): void
62  {
63  reset($this->skills);
64  }
65 
66  public function sleep(): array
67  {
68  return ['skills'];
69  }
70 
71  public function wakeup(): void
72  {
73  // TODO: Implement __wakeup() method.
74  }
75 }
$res
Definition: ltiservices.php:66
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
addSkill(int $skill_base_id, int $skill_ref_id)