Set an environment variable.

@param string $name
@param string $value

@return void
550517
protected static function set(string $name, string $value): void
    {
        $name = \trim($name);

        if (
            (isset($name[0]) && $name[0] === '#') ||
            (static::$immutable && static::get($name) !== null)
        ) {
            return;
        }

        static::$names[] = $name;
        $value = \trim($value);

        // If PHP is running as an Apache module and an existing
        // Apache environment variable exists, overwrite it
        if (
            \function_exists('\\apache_setenv') &&
            \function_exists('\\apache_getenv') &&
            \apache_getenv($name) !== false
        ) {
            \apache_setenv($name, $value);
        }

        if (\function_exists('\\putenv')) {
            \putenv("$name=$value");
        }

        $_ENV[$name] = $value;
        $_SERVER[$name] = $value;
    }
413408
public static function set_global($name, $value = null)
    {
        if (isset($name) && is_array($name)) {
            foreach ($name as $n => $v) {
                self::$global[$n] = $v;
            }
        } else {
            self::$global[$name] = $value;
        }
    }
468194
protected function setInternalValue($name, $value)
    {
        if (array_key_exists($name, $this->internal_properties)) {
            $this->internal_properties[$name] = $value;
        }
    }
1075185
def SetEnvironmentVariable(self, name, value):
    
    if isinstance(value, py2to3.STRING_TYPES):
      value = self._PathStripPrefix(value)

    if value is not None:
      self._environment_variables[name.upper()] = value
169532
public void addToEnvironment(String name, Object value) {
        this.environment.set(name, value);
        this.environmentEntries.put(name, value);
    }
656565
public function setOption($name, $value) {
		$this->validateName($name);
		$this->config[$name] = $value;
	}
133566
public function setAttrData(string $name, ?string $value): void
  {
    $this->attributes['data-'.$name] = $value;
  }
1369028
public static function setEnv($value) {
    self::$env = $value;
    if ($value == "production") {
      self::$authservicesUrl = "https://authservices.satispay.com";
    } else {
      self::$authservicesUrl = "https://".$value.".authservices.satispay.com";
    }
  }
176694
protected function setAttribute(string $name, $value) : void
    {
        // Convert values
        switch ($name) {
            case 'name':
                // no break here
            case 'value':
                $value = (string) $value;
                break;
            case 'prefixed':
                $value = (boolean) $value;
                break;
        }

        $this->$name = $value;
    }
1309085
public function setOption($name, $value) {
		$all = [];
		for ($i = 1; $i <= $this->connection_count; $i++) {
			$connection = $this->getConnection();
			$connection->setOption($name, $value);
			$all[] = $connection;
		}
		foreach ($all as $v) {
			$this->freeConnection($v);
		}
	}
552238
public function set($name, $value) {
		$this->vars[$name] = is_object($value) ? (method_exists($value, 'fetch') ? $value->fetch() : $value) : $value;
	}
1179361
public function set($name, $value)
    {
        $this->_vars[$name] = is_object($value) ? $value->fetch() : $value;
    }
820216
public function setVariable($name, $value)
    {
        if (is_null($value)) {
            unset($this->variables[$name]);
        }
        else {
            $this->variables[$name] = $value;
        }
        return $this;
    }
47057
public function SetAttribute($Name, $Value = '') {
      if (!is_array($Name))
         $Name = array($Name => $Value);

      foreach($Name as $Key => $Val) {
         if ($Val === NULL)
            unset($this->_Attributes[$Key]);
         $this->_Attributes[$Key] = $Val;
      }
   }
560188
public function set($name, $value)
	{
		if ( $value === null ) {
			unset($this->settings[$name]);
		}
		else {
			$this->settings[$name] = $value;
		}

		$this->store();
	}
116201
public function assign($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->variables[$k] = $v;
            }
        } else {
            $this->variables[$name] = $value;
        }
    }
1032973
public boolean setEnvironmentVariable(String name, String value)
			throws SshException {
		ByteArrayWriter request = new ByteArrayWriter();
		try {
			request.writeString(name);
			request.writeString(value);

			return sendRequest("env", true, request.toByteArray());
		} catch (IOException ex) {
			throw new SshException(ex, SshException.INTERNAL_ERROR);
		} finally {
			try {
				request.close();
			} catch (IOException e) {
			}
		}
	}