@param string $key
@param bool   $value

@return self
161056
public function addAttribute($key, $value = true)
    {
        if ($value === null) {
            return $this;
        }
        $this->attributes[$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;
    }
972048
public function whereBool($key = null, $value)
    {
        if (is_bool($value)) {
            $this->where($key, '==', $value);
        }
        return $this;
    }
1065001
public function set($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $subkey => $value) {
                $this->set($subkey, $value);
            }
        } else {
            $this->parameters[$key] = $value;
        }
        return $this;
    }
528440
public static function setBoolean($key, $value) {
		$_SESSION [$key] = UString::isBooleanTrue ( $value );
		return $_SESSION [$key];
	}
618983
public function withValue($key, $value)
    {
        $copy = $this->values;
        $copy[$key] = $value;
        return new Context($copy);
    }
621286
public function Create( $value )
    {
		if ( is_bool( $value ) )
		{
			$value = $value ? CoreFuncs::$True : CoreFuncs::$False;
		}
		else if ( ! $value instanceof CoreFuncs::$True &&  ! $value instanceof CoreFuncs::$False )
		{
			$value = Convert::ToBoolean( $value, null );
		}
        return new BoolProxy( $value );
    }
1151604
public function withEntry(string $key, $value): self
    {
        $this->bindings[$key] = $this->getValueCreator($value);
        return $this;
    }
1120961
public function setRaw(string $key, $value): self
    {
        $this->data[$key] = $value;
        return $this;
    }
1029495
public function set($key, $value = null)
    {
        if ($value === null) {
            $this->parameters = $key + $this->parameters;
        } else {
            $this->parameters[$key] = $value;
        }

        return $this;
    }
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;
    }
350249
public function set($key, $value)
    {
        $this->checkWriteAccess();
        $this->_settings[$key] = $value;
        return $this;
    }
952285
public function usingHeader(string $key, $value): self
    {
        $this->headers->put($key, $value);
        return $this;
    }
886147
public function distinct(bool $value = true)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->distinct($value);

        return $instance;
    }
683427
public function set($key, $value)
    {
        array_set($this->config, $key, $value);
        $this->persist();

        return $this;
    }
290020
public function set($key, $value)
	{
		Arr::set($this->body, $key, $value);

		return $this;
	}
131533
public function param($key, $value)
    {
        $this->params = array_merge($this->params ?? [], [$key => $value]);
        return $this;
    }