ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilECSOrganisation.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  protected string $name;
27  protected string $abbr;
28 
29  private ilLogger $logger;
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 }
loadFromJson($a_json)
load from json
global $DIC
Definition: shib_login.php:22
getAbbreviation()
Get abbreviation.