ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.ilObjFileVersion.php
Go to the documentation of this file.
1<?php
2
23class ilObjFileVersion extends ArrayObject
24{
28 public function __construct(array $input = [])
29 {
30 parent::__construct($input);
31 foreach ($input as $k => $v) {
32 $this->{$k} = $v;
33 }
34 }
35
39 public function getArrayCopy(): array
40 {
41 $a = [];
42 $r = new ReflectionClass($this);
43 foreach ($r->getProperties() as $p) {
44 $a[$p->getName()] = $p->getValue($this);
45 }
46 return $a;
47 }
48
49 protected string $date = '';
50 protected int $user_id = 0;
51 protected int $obj_id = 0;
52 protected string $obj_type = '';
53 protected string $action = '';
54 protected string $info_params = '';
55 protected string $user_comment = '';
56 protected int $hist_entry_id = 1;
57 protected ?string $title = '';
58 protected string $filename = '';
59 protected string $version = '';
60 protected string $max_version = '';
61 protected string $rollback_version = '';
62 protected string $rollback_user_id = '';
63 protected int $size = 0;
64
65 public function offsetExists(mixed $key): bool
66 {
67 return property_exists($this, $key);
68 }
69
70 public function offsetGet($index): mixed
71 {
72 return $this->{$index};
73 }
74
75 public function getDate(): string
76 {
77 return $this->date;
78 }
79
80 public function setDate(string $date): self
81 {
82 $this->date = $date;
83 return $this;
84 }
85
86 public function getUserId(): int
87 {
88 return $this->user_id;
89 }
90
91 public function setUserId(int $user_id): self
92 {
93 $this->user_id = $user_id;
94 return $this;
95 }
96
97 public function getObjId(): int
98 {
99 return $this->obj_id;
100 }
101
102 public function setObjId(int $obj_id): self
103 {
104 $this->obj_id = $obj_id;
105 return $this;
106 }
107
108 public function getObjType(): string
109 {
110 return $this->obj_type;
111 }
112
113 public function setObjType(string $obj_type): self
114 {
115 $this->obj_type = $obj_type;
116 return $this;
117 }
118
119 public function getAction(): string
120 {
121 return $this->action;
122 }
123
124 public function setAction(string $action): self
125 {
126 $this->action = $action;
127 return $this;
128 }
129
130 public function getInfoParams(): string
131 {
132 return $this->info_params;
133 }
134
135 public function setInfoParams(string $info_params): self
136 {
137 $this->info_params = $info_params;
138 return $this;
139 }
140
141 public function getUserComment(): string
142 {
143 return $this->user_comment;
144 }
145
146 public function setUserComment(string $user_comment): self
147 {
148 $this->user_comment = $user_comment;
149 return $this;
150 }
151
152 public function getHistEntryId(): int
153 {
155 }
156
157 public function setHistEntryId(int $hist_entry_id): self
158 {
159 $this->hist_entry_id = $hist_entry_id;
160 return $this;
161 }
162
163 public function getTitle(): string
164 {
165 return $this->title;
166 }
167
168 public function setTitle(string $title): self
169 {
170 $this->title = $title;
171 return $this;
172 }
173
174 public function getFilename(): string
175 {
176 return $this->filename;
177 }
178
179 public function setFilename(string $filename): self
180 {
181 $this->filename = $filename;
182 return $this;
183 }
184
185 public function getVersion(): string
186 {
187 return $this->version;
188 }
189
190 public function setVersion(string $version): self
191 {
192 $this->version = $version;
193 return $this;
194 }
195
196 public function getSize(): int
197 {
198 return $this->size;
199 }
200
201 public function setSize(int $size): self
202 {
203 $this->size = $size;
204 return $this;
205 }
206}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setVersion(string $version)
setInfoParams(string $info_params)
setFilename(string $filename)
setHistEntryId(int $hist_entry_id)
setUserComment(string $user_comment)
__construct(array $input=[])
@inheritDoc
setObjType(string $obj_type)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples