ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilECSOrganisation.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
26 protected string $name;
27 protected string $abbr;
28
30
31 public function __construct()
32 {
33 global $DIC;
34
35 $this->logger = $DIC->logger()->wsrv();
36 }
37
44 public function loadFromJson($a_json): void
45 {
46 if (!is_object($a_json)) {
47 $this->logger->warning(__METHOD__ . ': Cannot load from JSON. No object given.');
48 throw new ilException('Cannot parse ECSParticipant.');
49 }
50 $this->name = $a_json->name;
51 $this->abbr = $a_json->abbr;
52 }
53
57 public function getName(): string
58 {
59 return $this->name;
60 }
61
65 public function getAbbreviation(): string
66 {
67 return $this->abbr;
68 }
69}
getAbbreviation()
Get abbreviation.
loadFromJson($a_json)
load from json
Base class for ILIAS Exception handling.
Component logger with individual log levels by component id.
global $DIC
Definition: shib_login.php:26