Add data (internal function)
@param mixed  $value
@param string $key
@return SharedDataInterface
@internal
978397
protected function addDataInternal($value, $key) {
        if (null === $value || null === $key) {
            return $this;
        }
        $key = $this->processKey($key);
        if ($this->type === static::TYPE_DEFINED_ONLY && !array_key_exists($key, $this->shared)) {
            return $this;
        }
        return $this->addDataByScenario($value, $key);
    }
590753
public function set($key, $value) {
        if ($key) {
            $this->_data[$key] = $value;
        } else {
            $this->_data = $value;
        }
        $this->_modified = true;
        return $this;
    }
1000603
public function add($key, $value = null)
    {
        $this->_view->with($key, $value);

        return $this;
    }
506162
public function set($key, $value) {
        $this->_data[$this->_namespace][$key] = $value;
        return $this;
    }
1252770
public function add($key, $value)
    {
        $connection = $this->getConnection($key);
        $this->writeToRemote(array(
            'cmd' => 'add',
            'key' => $key,
            'value' => $value,
        ), $connection);
        return $this->readFromRemote($connection);
    }
1213698
public function appends($key, $value = null)
    {
        if (!is_array($key)) {
            $queries = [$key => $value];
        } else {
            $queries = $key;
        }

        foreach ($queries as $k => $v) {
            if ($k !== $this->options['var_page']) {
                $this->options['query'][$k] = $v;
            }
        }

        return $this;
    }
132641
public static function addSharedToArgs($arguments = [], $value, $key = null) {
        /** @var SharedDataInterface $instance */
        if (($instance = static::instanceFromArguments($arguments)) === null) {
            return null;
        }
        return $instance->addData($value, $key);
    }
989621
public function addHeader($key, $value) {
		if (is_array($value)) {
			foreach ($value as $v) {
				$this->addHeader($key, $v);
			}
		} else {
			$this->headers[$key][] = $value;
		}
		return $this;
	}
1281562
public function add(string $name, $value)
    {
        if (is_array($name)) {
            foreach ($name as $key => $value) {
                $this->data[$key] = $value;
            }

            return $this;
        }

        $this->data[$name] = $value;

        return $this;
    }
332927
public function insert($value, $key = null)
    {
        $answer = new HArrayInsert($this);
        return new static($answer->insert($value, $key));
    }
1101561
public static function addCustomData($key, $value, $depth = 5)
    {
        try {
            $collector = static::getInstance();
        } catch (\UnexpectedValueException $e) {
            return;
        }

        $data = $collector['custom.data'];

        if ($data === null) {
            $data = [];
        }

        if (is_array($value) || is_object($value)) {
            $value = h('pre', [], Arr::dump($value, $depth));
        }

        if (isset($data[$key]) && is_string($data[$key])) {
            $data[$key]   = [$data[$key]];
            $data[$key][] = (string) $value;
        } else {
            $data[$key] = (string) $value;
        }

        $collector['custom.data'] = $data;
    }
449580
public function setAttribute(string $key, $value): DataObjectInterface
    {
        $this->checkAttributeAssignable($key);

        $this->attributes[$key] = $value;

        return $this;
    }
1061721
public function share($key, $value = null): BladeInterface
    {
        $this->getViewFactory()->share($key, $value);

        return $this;
    }
780336
public function set($key, $value) {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } else {
            $this->data[ $key ] = $value;
        }
        return $this;
    }
1335748
public function with($key, $value = '')
    {
        if (is_array($key)) {
            $this->appends = $key;
        } elseif (is_callable($value)) {
            $this->appends[$key] = value($value);
        } else {
            $this->appends[$key] = value($value);
        }

        return $this;
    }
147761
public function addViewData($key, $value)
    {
        if ($key) {
            $this->modelVar[$key] = $value;
        } else {
            $this->modelVar = $value;
        }

        return $this;
    }
1249783
public function push($value, $key = null)
    {
        if ($key == null) {
            $this->storage[] = $value;
        } else {
            $this->storage[$key] = $value;
        }

        return $this;
    }