Set the given item
Parameters
$offset
stringrequired- Item name
$value
stringrequired- Item value
Source
public function offsetSet($offset, $value) {
if ($offset === null) {
throw new Exception('Object is a dictionary, not a list', 'invalidset');
}
if (is_string($offset)) {
$offset = strtolower($offset);
}
if (!isset($this->data[$offset])) {
$this->data[$offset] = [];
}
$this->data[$offset][] = $value;
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.