48 $this->map = new \ArrayObject();
61 public function get(
string $key):
string 63 $this->stringTypeCheck($key,
'key');
65 if ($this->map->offsetExists($key)) {
66 return $this->map->offsetGet($key);
69 throw new NoSuchElementException(
"No meta data associated with key \"$key\".");
82 return $this->map->getArrayCopy();
94 public function has(
string $key): bool
96 $this->stringTypeCheck($key,
'key');
98 return $this->map->offsetExists($key);
114 public function put(
string $key,
string $value): void
116 $this->stringTypeCheck($key,
'key');
117 $this->stringTypeCheck($value,
'value');
119 if ($this->map->offsetExists($key)) {
120 throw new ElementAlreadyExistsException(
"Element $key can not be overwritten.");
123 $this->map->offsetSet($key, $value);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
has(string $key)
Probe if the key is known and associated with a value.
toArray()
Returns all currently known entries.
Class EntryLockingStringMap.
__construct()
EntryLockingStringMap constructor.
put(string $key, string $value)
Puts a new key value pair into the string array.