Set a value if it's not null.

@param string $key
@param mixed $value
@return $this
352922
public function setIfNotNull($key, $value)
    {
        if (is_null($value)) {
            return $this;
        }

        return $this->set($key, $value);
    }
1009401
public function set($key, $value)
    {
        $cont = clone $this;
        $cont->doSet($key, $this->recursiveClone($value));

        return $cont;
    }
340608
public function set($key, $value)
    {
        $key = $this->normalizeKey($key);

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

        return $this;
    }
212341
function set($key, $value)
    {
        $p = &$this->__attainInternalPointer();
        $p[$key] = $value;
        return $this;
    }
300679
public function set($key, $value = null)
    {
        if (isset($value)) {
            return $this->array[$key] = $value;
        }

        return $this->array[] = $key;
    }
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;
	}
700027
public function set($key, $value)
    {
        $this->session->set(self::BASE_KEY.'.'.$key, $value);

        return $this;
    }
694386
public function set($key, $value = null): self
    {
        if (is_array($key)) {
            // must be assoc array
            foreach ($key as $key => $value) {
                $_SESSION[$this->name][$key] = $value;
            }
        } else {
            $_SESSION[$this->name][$key] = $value;
        }

        return $this;
    }
1093285
public function set($key, $value)
    {
        //argument test
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be scalar or null
            ->test(2, 'scalar', 'null');
        
        if (is_null($value)) {
            $value = 'NULL';
        } else if (is_bool($value)) {
            $value = $value ? 'TRUE' : 'FALSE';
        }
        
        $this->set[$key] = $value;
        
        return $this;
    }
698147
public function set($key, $value = null)
    {
        $data = is_array($key) ? $key : [$key => $value];
        $obj = self::instance();
        $obj->fill($data);
        return $obj->save();
    }
987830
public function set($key, $value = null)
    {
        $data = is_array($key) ? $key : [$key => $value];

        foreach ($data as $key => $value) {
            Arr::set($_SESSION, $key, $value);
        }

        return $this;
    }
1211238
public function setOption($key, $value)
    {
        $this->_options[$this->checkOptionKey($key)] = $value;
        return $this;
    }
490166
function set($key, $value) {
        parent::set($key, $value);
        if($this !== $this->client->channels) {
            $this->client->channels->set($key, $value);
        }
        
        return $this;
    }
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;
    }
792028
public function setPost($key, $value = null) {
        if (is_array($key)) {
            $this->POST = $key;
        } else {
            $this->POST[$key] = $value;
        }
        return $this;
    }
992812
function set($key, $value) {
        parent::set($key, $value);
        if($this !== $this->client->users) {
            $this->client->users->set($key, $value);
        }
        
        return $this;
    }
1359136
public function put($key = null, $value = null)
    {
        $this->offsetSet($key, $value);
        return $this;
    }