@param string       $key
@param array|string $path
@param mixed        $value

@return $this
975669
public function pushIn($key, $path, $value)
    {
        return $this->setIn($key, $path, $value, true);
    }
387244
public function set($key, $value)
    {
        $hash = $this->key_to_hash($key);
        $this->array[$hash] = $value;
        return $this;
    }
55070
public function set ($path, $value) {
		list ($first, $rest) = self::getFirstAndRestPathElements($path);

		# If we are going still deeper...
		if (!is_null($rest)) {
			if (!array_key_exists($first, $this -> data)) {
				$this -> applyValue($first, array());
			} else if (!($this -> data[$first] instanceof MutableTreeInterface)) {
				throw new InvalidKeyException("Value at key `" . $first . "` is a scalar; cannot step further down the requested path `" . $rest . "`");
			}

			/** @var MutableTreeInterface $tree */
			$tree = $this -> data[$first];

			$tree -> set($rest, $value);
		} else {
			$this -> applyValue($first, $value);
		}

		return $this;
	}
568977
public static function set($path,$key,$value=null) {

		$data = CoreManager::all($path);

		if(CoreManager::has($data,$key)) {

			Artisan::call('config:cache');

			$current_key_value = $key.'='.env($key);

			$value = str_replace(' ' , '_', $value);

			$new_key_value = $key.'='.$value;

			$result = file_put_contents($path, str_replace($current_key_value,$new_key_value,file_get_contents($path)));

			Artisan::call('config:cache');

			return true;
		
		}

		return false;
	
	}
177165
public function set($value, $key = null)
    {
        if (is_null($key)) {
            $this->registry[] = $value;
        } else {
            $this->registry[$key] = $value;
        }
        return $this;
    }
1242238
public function set($path = null, $value = null)
	{
		if ($path === null) {
            $this->data = $value;
            return $this;
        }

        $at       =& $this->data;
        $keys     = explode(".", $path);
        $keyCount = count($keys);

        for ($i=0; $i < $keyCount; $i++) {
            if (($keyCount-1) === $i) {
                if (is_array($at)) {
                    $at[$keys[$i]] = $value;
                } else {
                    throw new \RuntimeException("Can not set value at this path ($path) because is not array.");
                }
            } else {
                $key = $keys[$i];
                if (!isset($at[$key])) {
                    $at[$key] = [];
                }
                $at =& $at[$key];
            }
        }

        return $this;
	}
42711
public function setConfigurationValue($key, $value)
    {
        $completeConfiguration = $this->getConfiguration();
        $configuration = &$completeConfiguration;

        $pathParts = explode(self::DELIMITER, $key);
        foreach ($pathParts as $pathPart) {

            // If the current configuration is not an array,
            // but the client want to set a value, just overwrite the current value
            if (is_array($configuration) === false) {
                $configuration = [];
            }
            $configuration = &$configuration[ucfirst($pathPart)];
        }

        $configuration = $value;
        $this->setConfiguration($completeConfiguration);
    }
1219778
public function with($key, $value = null)
    {
        $values = (is_array($key) || $key instanceof Traversable) ? $key : [$key => $value];

        return $this->copy()->update($values);
    }
77767
public function set(string $path, $value): void
    {
        if (!empty($path)) {
            $at = & $this->items;
            $keys = $this->explode($path);

            while (count($keys) > 0) {
                if (count($keys) === 1) {
                    if (!is_array($at)) {
                        throw new RuntimeException('Can not set value at this path ['.$path.'] because is not array.');
                    }
                    $at[array_shift($keys)] = $value;
                } else {
                    $key = array_shift($keys);
                    if (!isset($at[$key])) {
                        $at[$key] = [];
                    }
                    $at =& $at[$key];
                }
            }
        } else {
            $this->items = [$value];
        }
    }
961836
public function set($key, $value)
    {
        if (is_null($value)) {
            $value = 'NULL';
        } else if (is_bool($value)) {
            $value = $value ? 'TRUE' : 'FALSE';
        }
        
        $this->set[$key] = $value;
        
        return $this;
    }
738563
public function set($path, $value)
    {
        PropertyAccessor::setByPath($this->values, $this->path($path), $value);
    }
618481
public function setMetadata($key, $value)
    {
        foreach ($this->routes as $route)
            $route->setMetadata($key, $value);
        return $this;
    }
318098
public static function setByPath(&$subject, array $path, $value)
    {
        $ptr = & $subject;
        foreach ($path as $key) {
            if (is_object($ptr)) {
                if (!isset($ptr->$key)) {
                    $ptr->$key = array();
                }
                $ptr = & $ptr->$key;
            } elseif (is_array($ptr)) {
                if (!isset($ptr[$key])) {
                    $ptr[$key] = array();
                }
                $ptr = & $ptr[$key];
            }
        }
        $ptr = $value;
        return $subject;
    }
1021596
public function insert( $key_path, $value ) {
		try {
			$this->update( $key_path, $value );
		} catch ( NonExistentKeyException $exception ) {
			$exception->get_traverser()->create_key();
			$this->insert( $key_path, $value );
		}
	}
970176
public function fillJsonAttribute($key, $value)
    {
        [$key, $path] = explode('->', $key, 2);

        $this->attributes[$key] = $this->asJson($this->getArrayAttributeWithValue(
            $path, $key, $value
        ));

        return $this;
    }
35339
public function offsetSet($path, $value)
	{
		if (is_null($path)) {
			$this->items[] = $value;
		} else {
			Arr::set($this->items, $this->keyFor($path), $value);
		}
	}
884784
protected function getArrayAttributeWithValue($path, $key, $value)
    {
        return array_set($this->getArrayAttributeByKey($key), str_replace('->', '.', $path), $value);
    }