ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilECSEvent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
26 public const CREATED = 'created';
27 public const UPDATED = 'updated';
28 public const DESTROYED = 'destroyed';
29 public const NEW_EXPORT = 'new_export';
30
31 protected object $json_obj;
32 public string $status = '';
33 public string $ressource = '';
34 public int $ressource_id = 0;
35 public ?string $ressource_type = '';
36
40 public function __construct($json_obj)
41 {
42 $this->json_obj = $json_obj;
43 $this->read();
44 }
45
49 public function getStatus(): string
50 {
51 return $this->status;
52 }
53
57 public function getRessource(): string
58 {
59 return $this->ressource;
60 }
61
65 public function getRessourceId(): int
66 {
68 }
69
70
74 public function getRessourceType(): ?string
75 {
77 }
78
79
83 private function read(): void
84 {
85 $this->status = $this->json_obj->status;
86 $this->ressource = $this->json_obj->ressource;
87
88 $res_arr = (array) explode('/', $this->getRessource());
89
90 $this->ressource_id = (int) array_pop($res_arr);
91 $this->ressource_type = array_pop($res_arr);
92 }
93}
string $ressource_type
read()
Read community entries and participants.
getRessourceType()
Get ressource type.
getStatus()
get title
getRessource()
getDescription
__construct($json_obj)
getRessourceId()
Get ressource id.