Sets a value to the dot-notated internal array.

@param int|string|array $key   The key of the item to be set or an array of key=>value pairs.
@param mixed            $value The value to be set to the item.

@see DotArr::set
347815
public function set($key, $value = null)
    {
        DotArr::set($this->data, $key, $value);
    }
213157
public function set($key, $value)
    {
        $keys = explode('.', $key);
        $key_string = '';
        foreach ($keys as $i => $_key) {
            $key_string = $key_string . ((is_numeric($_key) || $_key === '') ? "[{$_key}]" : "['{$_key}']");
        }
        $script = sprintf('$this->_params%s = $value;', $key_string);
        eval($script);
    }
706900
public function set($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $configKey => $configValue) {
                $this->setSingleItem($configKey, $configValue);
            }
        } else {
            $this->setSingleItem($key, $value);
        }
    }
511721
public function setValue($key, $value)
    {
        $this->langstrings[$key] = $value;
        $this->debug('SetValue ' . $key . ' => ' . $value);
    }
1130090
public function setGet($key, $value = null)
    {
        if (is_array($key)) {
            $this->get = array_merge($this->get, $key);
        } else {
            $this->get[$key] = $value;
        }
    }
1032832
public function set($key, $value) {
        header('' . $key . ': ' . $value . '', true);
        $this->vars[$key] = $value;
    }
754483
public static function set( &$array, $keys , $value ){
		$kArr = explode(".", $keys);
		$cursor = &$array;
		for( $i=0;$i<count( $kArr);$i++ ){
			$k = $kArr[$i];
			if( !isset($cursor[$k] )){
				//throw new \Exception("Undefined index '" . $k . "'");
				$cursor = null;
				break;
			}
			else{
				$cursor= &$cursor[$k];
			}
		}
		if( $cursor != null ){
			$cursor = $value;
			 
		}
		return $array;
	}
1363274
public function set($key, $value = null)
    {
        if (!$this->checkExtraColumns()) {
            return;
        }

        $this->load();
        $this->unsaved = true;

        if (is_array($key)) {
            foreach ($key as $k => $v) {
                Arr::set($this->data, $k, $v);
            }
        } else {
            Arr::set($this->data, $key, $value);
        }
    }
295198
public function set($key, $value)
    {
        if (! is_scalar($key)) {
            throw InvalidArgumentException('Invalid key type');
        }
        $this->items[$this->normalizeKey($key)] = $value;
    }
214017
public static function set($key, $value) {
        if (!isset(self::$config['settings'])) {
            self::$config['settings'] = array();
        }

        self::$config['settings'][$key] = $value;
    }
940295
public function put( $key, $value = null ) {
		if ( ! is_array( $key ) ) {
			$key = [ $key => $value ];
		}

		foreach ( $key as $array_key => $array_value ) {
			Arr::set( $this->attributes, $array_key, $array_value );
		}
	}
171030
public function set($key, $value)
    {
        DotArray::set($this->getStorage(), $key,$value);

        return $this;
    }
852057
public function set($key, $value) {

        $value = $this->connection->quote(json_encode($value, JSON_NUMERIC_CHECK));

        if($this->exists($key)) {
            $sql = "UPDATE ".$this->table." SET `keyval`={$value} WHERE `key`='{$key}'";
        } else {
            $sql = "INSERT INTO ".$this->table." (`key`,`keyval`) VALUES ('{$key}',{$value})";
        }

        $this->connection->exec($sql);
    }
1310868
public function set($key, $value, $dot_syntax = true)
    {
        if ($dot_syntax === true) {

            $paths = explode('.', $key);
            $pathCount = count($paths);
            $currentIteration = 0;
            $node =& $this->_data;
            foreach ($paths as $path) {
                if (isset($node[$path])) {
                    $node =& $node[$path];
                    $currentIteration++;
                } elseif($currentIteration < $pathCount) {
                    $node[$path] = array();
                    $node =& $node[$path];
                    $currentIteration++;
                }
            }
            
            $node = $value;
            
        } else {
            
            $this->_data[$key] = $value;
            
        }

        return $this;
    }
712016
public static function set( & $array, $key, $value)
	{
		if(is_null($key))
		{
			return $array = $value;
		}

		if(strpos($key, ".") !== false)
		{
			for( $i = 0, $keys = explode('.', $key), $count = count($keys); $i < $count; $i++ )
			{
				$key = $keys[$i];
				if( $i + 1 == $count )
				{
					break;
				}

				// If the key doesn't exist at this depth, we will just create an empty array
				// to hold the next value, allowing us to create the arrays to hold final
				// values at the correct depth. Then we'll keep digging into the array.
				if(! isset($array[$key]) || ! is_array($array[$key]))
				{
					$array[$key] = [];
				}

				$array = & $array[$key];
			}
		}

		$array[$key] = $value;

		return $array;
	}
1013462
public function set($keys, $value = null)
    {
        if (is_array($keys)) {
            foreach ($keys as $key => $value) {
                $this->set($key, $value);
            }

            return;
        }

        $items = &$this->items;

        foreach (explode('.', $keys) as $key) {
            if (!isset($items[$key]) || !is_array($items[$key])) {
                $items[$key] = [];
            }

            $items = &$items[$key];
        }

        $items = $value;
    }
846700
protected function _set($key, $value)
    {
        if (!is_string($key)) {
            throw new Exception\InvalidArgumentException(
                "Key must be a string or a number: '$key' given"
            );
        }
        $this->_data[$key] = $value;
    }