Add information to the context.

@param string $key      Context key to add.
@param mixed  $value    Value to add under the given key.
@param string $behavior Behavior to use for adapting the context.
@return View
320865
public function addToContext( string $key, $value, string $behavior ): View
    {
        switch ($behavior) {
            case View::REPLACE:
                $this->_context_[$key] = $value;
                return $this;
            case View::MERGE:
                if(array_key_exists($key, $this->_context_)) {
                    $this->_context_ = array_merge_recursive($this->_context_, [$key => $value]);
                    return $this;
                }
                $this->_context_[$key] = $value;
                return $this;
            case View::ADD_ONLY:
                if (array_key_exists($key, $this->_context_)) {
                    return $this;
                }
                $this->_context_[$key] = $value;
                return $this;
            case View::REPLACE_ONLY:
                if (! array_key_exists($key, $this->_context_)) {
                    return $this;
                }
                $this->_context_[$key] = $value;
                return $this;
            case View::MERGE_ONLY:
                if (! array_key_exists($key, $this->_context_)) {
                    return $this;
                }
                $this->_context_ = array_merge_recursive($this->_context_, [$key => $value]);
                return $this;
            default:
                throw new InvalidContextAddingBehavior(
                    sprintf(
                        _('Invalid behavior "%s" for adding to the context of view "%s".'),
                        $key,
                        $this->_uri_
                    )
                );
        }
    }
161056
public function addAttribute($key, $value = true)
    {
        if ($value === null) {
            return $this;
        }
        $this->attributes[$key] = $value;

        return $this;
    }
230843
public function add($key, $value)
    {
        $array = array_get($this->configs, $key);

        if (is_array($array)) {
            $array[] = $value;
            array_set($this->configs, $key, $array);
        }


        return $this;
    }
1145444
public function put($key, $value)
    {
        return $this->session->put($this->getSessionKey($key), $value);
    }
1241685
public function addBaggageItem($key, $value){
        $this->log([
            'event' => 'baggage',
            'key' => $key,
            'value' => $value,
        ]);
        return $this->spanContext->withBaggageItem($key, $value);
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}
695645
public function addCookie($key, $value) {

		if(false === is_string($key)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
		}

		if(false === is_string($value)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
		}

		$this -> cookies[] = sprintf('%s=%s', $key, $value);

		return $this;
	}
637412
public static function set(string $key, $value)
    {
        return self::getViewHelper()->getView()->addValue($key, $value);
    }
1204556
public function addHeader(string $key, string $value): Response
    {
        $this->headers->add($key, $value);
        return $this;
    }
206146
public function add($key, $value): self
    {
        if (is_array($key)) {
            @ [$key, $value] = $key;
        }

        return $this->set($key, $value);
    }
238139
public function addIfNotEmpty($key, $value)
    {
        if (empty($value)) {
            return $this;
        }

        return $this->add($key, $value);
    }
1268867
public function with($key, $value)
    {
        $this->hasData = true;

        $this->session->create($key, $value);

        return $this;
    }
389333
public function addQueryParameter(string $key, string $value): self
    {
        if ($this->query === null) {
            $this->query = "{$key}={$value}";
        } else {
            $this->query = "{$this->query}&{$key}={$value}";
        }

        return $this;
    }
387224
protected function addDirectiveToEntry($key, $value, LdifEntryInterface $entry)
    {
        if ($entry instanceof LdifEntryAdd) {
            $entry->addAttribute($key, $value);
        } elseif ($entry instanceof LdifEntryModDn) {
            $this->addModDnDirective($entry, $key, $value);
        } elseif ($entry instanceof LdifEntryModify) {
            $this->addModifyDirective($entry, $key, $value);
        }
    }
547710
public function addAdditionalField(string $key, string $value): self
    {
        $this->additionalFields[$key] = $value;

        return $this;
    }
1080064
public function insert($value, $key = null)
    {
        $answer = new HStringInsert($this);
        return new static($answer->insert($value, $key));
    }
789466
public function addAppData(string $key, $value = null): void
    {
        $this->_additionalAppData[$key] = $value;
    }