Add an entrey to the registry.

@param string $pKey
@param mixed $value
@return bool
511783
public static function set($pKey, $pValue)
    {
        if (array_key_exists($pKey, self::$_registry)) {
            throw new Exception("The registry key '$pKey' already exists");
        }

        return self::$_registry[$pKey] = $pValue;
    }
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);
    }
137905
public static function keyIsset($value, $key): bool
    {
        if (!static::isArrayAccessible($value)) {
            return false;
        }

        return isset($value[$key]);
    }
19913
public function set($key, $value)
    {
        $keys = explode('.', $key);

        $data = &$this->parameters;

        while (count($keys) > 1) {
            $pkey = $keys[0];

            if (!array_key_exists($pkey, $data) || !is_array($data[$pkey])) {
                $data[$pkey] = [];
            }

            $data = &$data[$pkey];
            array_shift($keys);
        }

        $data[$keys[0]] = $value;

        return $this;
    }
1151604
public function withEntry(string $key, $value): self
    {
        $this->bindings[$key] = $this->getValueCreator($value);
        return $this;
    }
863642
public function insert(string $value): bool
    {
        return $this->handle->pfAdd($this->name, [$value]);
    }
611249
public function setKey(string $value) : Setting
    {

        if ($this->data['key'] !== $value) {
            $this->data['key'] = $value;
            $this->setModified('key');
        }

        return $this;
    }
1018949
public function set($key, $value)
        {
            if (!$this->enabled) {
                return false;
            }

            switch ($this->type) {
                case self::TYPE_APC:
                    apc_store($key, $value);
                    break;
                case self::TYPE_FILE:
                    $filename = $this->path . $key . '.cache';
                    file_put_contents($filename, serialize($value));
                    break;
            }


            return true;
        }
1355718
public function set($key, $value)
    {
        $setting = SettingModel::create(
            [
                'key' => $key,
                'value' => $value,
            ]
        );

        return $setting ? $value : false;
    }
280653
public function add($key, $value)
    {
        if (! is_null($key)) {
            $currentValue = Arr::get($this->payload, $key, []);

            if (! is_array($currentValue)) {
                $currentValue = Arr::wrap($currentValue);
            }

            $currentValue[] = $value;

            Arr::set($this->payload, $key, $currentValue);
        }

        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;
    }
694330
public function add($key, $value){
        if( $this->exists($key) ){
            throw new Exception("Item already exists in storage ($key)  ($this->name)");
        }
        $this->storage[$key] = $value;
        return $this->storage[$key];

    }
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;
    }
869584
public function add($key, $value)
    {
        if ($this->has($key) === false) {
            $this->set($key, $value);
        }

        return $this->array;
    }
918533
public static function add($key, $value = null, $seconds = 0, $encrypt = false, $path = null, $domain = null, $secure = null, $httponly = null) {

		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(null !== $value && 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);
		}

		if(null !== $seconds && false === ('-' . intval($seconds) == '-' . $seconds)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($seconds)), E_USER_ERROR);
		}

		if(null !== $encrypt && false === is_bool($encrypt)) {
			return trigger_error(sprintf('Argument 4 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($encrypt)), E_USER_ERROR);
		}

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

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

		if(null !== $secure && false === is_bool($secure)) {
			return trigger_error(sprintf('Argument 7 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($secure)), E_USER_ERROR);
		}

		if(null !== $httponly && false === is_bool($httponly)) {
			return trigger_error(sprintf('Argument 8 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($httponly)), E_USER_ERROR);
		}

		$cookie = session_get_cookie_params(); 

		if(true === $encrypt) {

			if(null === Application :: get('salt')) {
				return trigger_error('You should specify a salt (string) in the Application config before encrypting Cookies', E_USER_ERROR);
			}

			$key 	= rtrim(base64_encode($key), '=');
			$value 	= base64_encode(Hash :: encrypt($value, Application :: get('salt')));
		}

		setcookie($key, $value, time() + $seconds, ($path || $cookie['path']), ($domain || $cookie['domain']), ($secure || $cookie['secure']), ($httponly || $cookie['httponly']));
	}
841797
public function add($key, $value)
    {
        if (! isset($this->_params[$key])) {
            $this->_params[$key] = array();
        }
        $this->_params[$key][] = $value;
    }
82293
public function add( $key, $value ) {
		$storage         = $this->storage;
		$storage[ $key ] = $value;

		return new static( $this->get_key_type(), $this->get_value_type(), $storage );
	}