Elgg\DeprecationWrapper::offsetSet PHP Method

offsetSet() public method

Array access interface
See also: ArrayAccess::offsetSet()
public offsetSet ( mixed $key, mixed $value ) : void
$key mixed Name
$value mixed Value
return void
    public function offsetSet($key, $value)
    {
        $this->displayWarning();
        if (is_object($this->object) && !$this->object instanceof \ArrayAccess) {
            $this->object->{$key} = $value;
        } else {
            if ($key === null) {
                // Yes this is necessary. Otherwise $key will be interpreted as empty string
                $this->object[] = $value;
            } else {
                $this->object[$key] = $value;
            }
        }
    }