set session variables

@param	string|array	name of the variable to set or array of values, array(name => value)
@param	mixed			value
@access	public
@return	Fuel\Core\Session_Driver
517435
public function set($name, $value = null)
	{
		is_null($name) or \Arr::set($this->data, $name, $value);

		return $this;
	}
168880
public static function set(string $key, $value)
    {
        // Start session if needed
        if (! session_id()) {
            self::start();
        }

        // Set key
        $_SESSION[(string) $key] = $value;
    }
296919
public function set($var, $value = null)
	{
		if ( ! is_array($var))
		{
			$var = array ($var => $value);
		}

		foreach ($var as $key => $value)
		{
			$value = $this->validateConfig($key, $value);

			if (isset($this->config[$key]))
			{
				// preserve the type
				if (is_bool($this->config[$key]))
				{
					$this->config[$key] = (bool) $value;
				}
				elseif (is_string($this->config[$key]))
				{
					$this->config[$key] = (string) $value;
				}
				else
				{
					$this->config[$key] = (int) $value;
				}
			}
		}
	}
88566
public function set($key, $value)
    {
        $this->initialize();

        $ids = explode('.', $key);
        $base = &$this->data;

        while ($current = array_shift($ids)) {
            if (is_array($base) && array_key_exists($current, $base)) {
                $base = &$base[$current];
            } else {
                $base[$current] = [];
                $base = &$base[$current];
            }
        }

        $base = $value;
        $this->session->set($this->name, $this->data);
    }
1073034
public function set_var($name, $value, $mods = array())
    {
        // Check if variable exists
        for ($i=0, $len=count($this->vars); $i<$len; $i++) {
            if ($this->vars[$i]['name'] == $name) {
                break;
            }
        }

        $var = array_merge($mods, array('name' => $name, 'value' => $value));
        $this->vars[$i] = $var;
    }
1283925
function set($var, $value)
    {
        if (in_array($var, get_object_vars($this)))
        {
            $this->$var = $value;
        }
        else
        {
            Error::info(__FUNCTION__, $var . " does not belong to PB_Page!");
        }
    }
615474
public function session($key = null, $value = null)
    {
        if (! is_null($key))
        {
            return $this->client->request('session-set', array($key => $value));
        }

        return $this->client->request('session-get');
    }
166417
public function set($name, $value)
    {
        $context = $this->_context;

        if (!$context->started) {
            $this->_start();
        }

        $context->is_dirty = true;
        $context->_SESSION[$name] = $value;
    }
362550
public static function set($name, $value, $expire = null){
        return self::driver()->set($name,$value,$expire);
    }
598252
private function initializeVariables($value)
    {
        preg_match_all('/\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/', $value, $matches);

        foreach (array_unique($matches[0]) as $variable) {
            $value = "<?php $variable = isset($variable) ? $variable : null; ?>\n".$value;
        }

        return $value;
    }
940682
public function set($name, $value)
    {
        parent::set($name, $value);

        $_SESSION[$name] = $value;

        return $this;
    }
499089
public static function setUserdata($data = '', $value = NULL)
    {
        if (is_array($data)) {
            foreach ($data as $key => &$value) {
                $_SESSION[$key] = $value;
            }

            return;
        }

        $_SESSION[$data] = $value;
    }
1011600
public function setVariable($key, $value, $feature = null)
    {
        $this->variables[$key] = $value;

        $this->set($key, $value, $feature);

        return $this;
    }
885810
public function set($data, $value = null): SessionInterface
    {
        if (is_array($data)) {
            $newData = [];
            foreach ($data as $key => $val) {
                $key = $this->getNamespacedKey($key);
                $newData[$key] = $val;
            }
            $data = $newData;
        } else {
            $data = $this->getNamespacedKey($data);
        }

        $this->session->set($data, $value);

        return $this;
    }
352424
public function set($variable, $value = null)
    {
        $this->variables[$variable] = array(
            'safe' => $this->htmlEncode($value),
            'unsafe' => $value
        );

        return $this;
    }
820216
public function setVariable($name, $value)
    {
        if (is_null($value)) {
            unset($this->variables[$name]);
        }
        else {
            $this->variables[$name] = $value;
        }
        return $this;
    }
26037
public function setVar($name, $value)
    {
        $this->loadVars();
		if ($value === null) {
			unset($this->_config[$name]);
		}
		else {
			$this->_config[$name] = $value;
		}
		$f = fopen(PREFS_FILE,'w');
		foreach($this->_config as $name => $value) {
			if (is_array($value)) continue;
			fwrite($f,$name."=".$value."\n");
		}
		foreach($this->_config as $name => $value) {
			if (!is_array($value)) continue;
			fwrite($f,"\n[".$name."]\n");
			foreach ($value as $key => $val) {
				fwrite($f,$key."=".$val."\n");
			}
		}		
		fclose($f);  			
    }