ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjFileVersion.php
Go to the documentation of this file.
1<?php
2
7class ilObjFileVersion extends ArrayObject
8{
12 public function __construct($input = array())
13 {
14 parent::__construct($input);
15 foreach ($input as $k => $v) {
16 $this->{$k} = $v;
17 }
18 }
19
23 public function getArrayCopy()
24 {
25 $a = [];
26 $r = new ReflectionClass($this);
27 foreach ($r->getProperties() as $p) {
28 $p->setAccessible(true);
29 $a[$p->getName()] = $p->getValue($this);
30 }
31 return $a;
32 }
33
34 protected $date = '';
35 protected $user_id = 0;
36 protected $obj_id = 0;
37 protected $obj_type = '';
38 protected $action = '';
39 protected $info_params = '';
40 protected $user_comment = '';
41 protected $hist_entry_id = 1;
42 protected $title = '';
43 protected $filename = '';
44 protected $version = '';
45 protected $max_version = '';
46 protected $rollback_version = '';
47 protected $rollback_user_id = '';
48 protected $size = 0;
49
53 public function offsetGet($index)
54 {
55 return $this->{$index};
56 }
57
61 public function getDate() : string
62 {
63 return $this->date;
64 }
65
70 public function setDate(string $date) : ilObjFileVersion
71 {
72 $this->date = $date;
73 return $this;
74 }
75
79 public function getUserId() : int
80 {
81 return $this->user_id;
82 }
83
88 public function setUserId(int $user_id) : ilObjFileVersion
89 {
90 $this->user_id = $user_id;
91 return $this;
92 }
93
97 public function getObjId() : int
98 {
99 return $this->obj_id;
100 }
101
106 public function setObjId(int $obj_id) : ilObjFileVersion
107 {
108 $this->obj_id = $obj_id;
109 return $this;
110 }
111
115 public function getObjType() : string
116 {
117 return $this->obj_type;
118 }
119
124 public function setObjType(string $obj_type) : ilObjFileVersion
125 {
126 $this->obj_type = $obj_type;
127 return $this;
128 }
129
133 public function getAction() : string
134 {
135 return $this->action;
136 }
137
142 public function setAction(string $action) : ilObjFileVersion
143 {
144 $this->action = $action;
145 return $this;
146 }
147
151 public function getInfoParams() : string
152 {
153 return $this->info_params;
154 }
155
161 {
162 $this->info_params = $info_params;
163 return $this;
164 }
165
169 public function getUserComment() : string
170 {
171 return $this->user_comment;
172 }
173
179 {
180 $this->user_comment = $user_comment;
181 return $this;
182 }
183
187 public function getHistEntryId() : int
188 {
190 }
191
197 {
198 $this->hist_entry_id = $hist_entry_id;
199 return $this;
200 }
201
205 public function getTitle()
206 {
207 return $this->title;
208 }
209
214 public function setTitle($title)
215 {
216 $this->title = $title;
217 return $this;
218 }
219
223 public function getFilename() : string
224 {
225 return $this->filename;
226 }
227
232 public function setFilename(string $filename) : ilObjFileVersion
233 {
234 $this->filename = $filename;
235 return $this;
236 }
237
241 public function getVersion() : string
242 {
243 return $this->version;
244 }
245
250 public function setVersion(string $version) : ilObjFileVersion
251 {
252 $this->version = $version;
253 return $this;
254 }
255
259 public function getMaxVersion() : string
260 {
261 return $this->max_version;
262 }
263
269 {
270 $this->max_version = $max_version;
271 return $this;
272 }
273
277 public function getSize() : int
278 {
279 return $this->size;
280 }
281
286 public function setSize(int $size) : ilObjFileVersion
287 {
288 $this->size = $size;
289 return $this;
290 }
291}
An exception for terminatinating execution or to throw for unit testing.
Class ilObjFileVersion.
setVersion(string $version)
setInfoParams(string $info_params)
setFilename(string $filename)
setHistEntryId(int $hist_entry_id)
offsetGet($index)
@inheritDoc
setUserComment(string $user_comment)
setObjType(string $obj_type)
setMaxVersion(string $max_version)
__construct($input=array())
@inheritDoc
$index
Definition: metadata.php:128
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples