ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAccessibilityCriterionConfig.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
13 public function __construct($data = [])
14 {
15 if (is_array($data)) {
17 } else {
19
20 if (is_string($data)) {
21 $this->fromJson($data);
22 }
23 }
24 }
25
29 public function toJson() : string
30 {
31 $json = json_encode($this);
32
33 return $json;
34 }
35
39 public function fromJson(string $json) : void
40 {
41 $data = json_decode($json, true);
42
43 $this->exchangeArray($data);
44 }
45
49 public function jsonSerialize()
50 {
51 return $this->getArrayCopy();
52 }
53}
An exception for terminatinating execution or to throw for unit testing.
Class ilAccessibilityCriterionConfig.
__construct($data=[])
ilAccessibilityCriterionConfig constructor.
Interface ilAccessibilityJsonSerializable.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$data
Definition: storeScorm.php:23