ILIAS  release_8 Revision v8.24
class.ilECSEvent.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types=1);
19
24{
25 public const CREATED = 'created';
26 public const UPDATED = 'updated';
27 public const DESTROYED = 'destroyed';
28 public const NEW_EXPORT = 'new_export';
29
30 protected object $json_obj;
31 public string $status = '';
32 public string $ressource = '';
33 public int $ressource_id = 0;
34 public ?string $ressource_type = '';
35
39 public function __construct($json_obj)
40 {
41 $this->json_obj = $json_obj;
42 $this->read();
43 }
44
48 public function getStatus(): string
49 {
50 return $this->status;
51 }
52
56 public function getRessource(): string
57 {
58 return $this->ressource;
59 }
60
64 public function getRessourceId(): int
65 {
67 }
68
69
73 public function getRessourceType(): ?string
74 {
76 }
77
78
82 private function read(): void
83 {
84 $this->status = $this->json_obj->status;
85 $this->ressource = $this->json_obj->ressource;
86
87 $res_arr = (array) explode('/', $this->getRessource());
88
89 $this->ressource_id = (int) array_pop($res_arr);
90 $this->ressource_type = array_pop($res_arr);
91 }
92}
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.