Set a value for the current array (optional using dot-notation).

@param string $key   <p>The key to set.</p>
@param mixed  $value <p>Its value.</p>

@return static
<p>(Mutable)</p>
330835
public function set($key, $value): self
    {
        $this->generatorToArray();

        $this->internalSet($key, $value);

        return $this;
    }
311149
public function set($key, $value): ArrayCollection
    {
        if ($key === null) {
            $this->items[] = $value;
        } else {
            $this->items[$key] = $value;
        }

        return $this;
    }
771687
public static function set($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);
		}

		static :: $data[$key] = $value;
	}
861634
public function set($key, $value)
    {
        $this->checkRestriction($value);

        if (!is_null($key)) {
            $this->value[$key] = $value;
        } else {
            $this->value[] = $value;
        }

        return $this;
    }
1099183
public static function set(string $key, $value)
    {
        return self::getInstance()->getConfig()->set($key, $value);
    }
1324932
public function set($key, $value) : HashMap
    {
        $values = $this->_set($key, $value, false);
        $this->setValues($values);
        return $this;
    }
79537
public function set(string $dotKey, $value){

		if(empty($dotKey)){
			$this->array = $value;

			return $this;
		}

		$array = &$this->array;
		$keys = \explode('.', $dotKey);

		while(\count($keys) > 1){
			$dotKey = \array_shift($keys);

			// 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[$dotKey]) || !\is_array($array[$dotKey])){
				$array[$dotKey] = [];
			}

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

		$array[\array_shift($keys)] = $value;

		return $this;
	}
637412
public static function set(string $key, $value)
    {
        return self::getViewHelper()->getView()->addValue($key, $value);
    }
119938
public function set($key, $value = null) {
        if (strpos($key, '.') === false) {
            $this->_data[$key] = $value;
        } else {
            $this->_data = Hash::set($this->_data, $key, $value);
        }

        return $this;
    }
1316827
public function set($key, $value)
    {
        $this->data[$key] = $value;
        $this->version++;
        
        return $this;
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}
1272701
public static function set(&$array, $key, $value)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '')
        {
            return ($array = $value);
        }

        $keys = explode('.', $key);
        $last = array_pop($keys);
        $currentElement =& $array;

        foreach ($keys as $currentKey)
        {
            if (!array_key_exists($currentKey, $currentElement) || !is_array($currentElement[$currentKey]))
            {
                $currentElement[$currentKey] = [];
            }

            $currentElement =& $currentElement[$currentKey];
        }

        $currentElement[$last] = $value;

        return $array;
    }
270561
public function set($key, $value)
    {
        if (method_exists($this, 'validate' . ucfirst($key))) {
            $value = call_user_func([$this, 'validate' . ucfirst($key)], $value);
        }

        $this->checkKeyExistInDefault($key);

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

        return $this;
    }
920234
public function set($key, $value)
    {
        if ($key === null && is_object($value)) {
            $key = spl_object_hash($value);
        }

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

        return $this;
    }
74893
public function setValue($value)
    {
        if (is_array($value)) {
            foreach ($value as $childKey => $childValue) {
                $this->children[$childKey] = new static($childValue);
            }
            $this->value = null;
        } else {
            $this->value = $value;
            $this->children = array();
        }
        return $this;
    }
348457
public function set($key = null, $value = null)
    {
        $this->getObject()->set($key, $value);

        return $this;
    }
253714
public function setProperty($key, $value = null){
		if($key instanceof Property){
			$value	= $key;
			$key	= $key->getName();
		}elseif(!$value instanceof Property){
			$value	= new Property($key, $value);
		}
		
		foreach($this->properties as $index=>$property){
			if($property->getName() == $key){
				unset($this->properties[$index]);
			}
		}
		
		$this->properties[] = $value;
		return $this;
	}