ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.Run.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27class Run
28{
29 protected ?int $id = null;
30 protected int $survey_id = 0;
31 protected int $user_id = 0;
32 protected string $code = "";
33 protected bool $finished = false;
34 protected int $tstamp = 0;
35 protected int $lastpage = 0;
36 protected int $appraisee_id = 0;
37
38 public function __construct(
39 int $survey_id,
40 int $user_id
41 ) {
42 $this->survey_id = $survey_id;
43 $this->user_id = $user_id;
44 }
45
46 public function getCode(): string
47 {
48 return $this->code;
49 }
50
51 public function getSurveyId(): int
52 {
53 return $this->survey_id;
54 }
55
56 public function getId(): int
57 {
58 return $this->id;
59 }
60
61 public function getUserId(): int
62 {
63 return $this->user_id;
64 }
65
66 public function getTimestamp(): int
67 {
68 return $this->tstamp;
69 }
70
71 public function getFinished(): bool
72 {
73 return $this->finished;
74 }
75
76 public function getLastPage(): int
77 {
78 return $this->lastpage;
79 }
80
81 public function getAppraiseeId(): int
82 {
84 }
85
86 public function withId(int $id): self
87 {
88 $run = clone $this;
89 $run->id = $id;
90 return $run;
91 }
92
93 public function withSurveyId(int $id): self
94 {
95 $run = clone $this;
96 $run->survey_id = $id;
97 return $run;
98 }
99
100 public function withUserId(int $user_id): self
101 {
102 $run = clone $this;
103 $run->user_id = $user_id;
104 return $run;
105 }
106
107 public function withTimestamp(int $tstamp): self
108 {
109 $run = clone $this;
110 $run->tstamp = $tstamp;
111 return $run;
112 }
113
114 public function withCode(string $code): self
115 {
116 $run = clone $this;
117 $run->code = $code;
118 return $run;
119 }
120
121 public function withFinished(bool $finished): self
122 {
123 $run = clone $this;
124 $run->finished = $finished;
125 return $run;
126 }
127
128 public function withLastPage(int $last_page): self
129 {
130 $run = clone $this;
131 $run->lastpage = $last_page;
132 return $run;
133 }
134
135 public function withAppraiseeId(int $appr_id): self
136 {
137 $run = clone $this;
138 $run->appraisee_id = $appr_id;
139 return $run;
140 }
141}
Code data class.
Definition: class.Run.php:28
withUserId(int $user_id)
Definition: class.Run.php:100
withTimestamp(int $tstamp)
Definition: class.Run.php:107
withAppraiseeId(int $appr_id)
Definition: class.Run.php:135
__construct(int $survey_id, int $user_id)
Definition: class.Run.php:38
withLastPage(int $last_page)
Definition: class.Run.php:128
withFinished(bool $finished)
Definition: class.Run.php:121
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...