ILIAS  release_8 Revision v8.23
class.ilECSOrganisation.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
24 {
25  protected string $name;
26  protected string $abbr;
27 
28  private ilLogger $logger;
29 
30  public function __construct()
31  {
32  global $DIC;
33 
34  $this->logger = $DIC->logger()->wsrv();
35  }
36 
43  public function loadFromJson($a_json): void
44  {
45  if (!is_object($a_json)) {
46  $this->logger->warning(__METHOD__ . ': Cannot load from JSON. No object given.');
47  throw new ilException('Cannot parse ECSParticipant.');
48  }
49  $this->name = $a_json->name;
50  $this->abbr = $a_json->abbr;
51  }
52 
56  public function getName(): string
57  {
58  return $this->name;
59  }
60 
64  public function getAbbreviation(): string
65  {
66  return $this->abbr;
67  }
68 }
global $DIC
Definition: feed.php:28
loadFromJson($a_json)
load from json
getAbbreviation()
Get abbreviation.