Session.php
public function set($name, $value = null, $namespace = 'default')
	{
		// Add prefix to namespace to avoid collisions
		$namespace = '__' . $namespace;

		if ($this->getState() !== 'active')
		{
			return;
		}

		$old = isset($_SESSION[$namespace][$name]) ? $_SESSION[$namespace][$name] : null;

		if ($value === null)
		{
			unset($_SESSION[$namespace][$name]);
		}
		else
		{
			$_SESSION[$namespace][$name] = $value;
		}

		return $old;
	}
public function set($name, $value = null, $namespace = 'default')
	{
		// Add prefix to namespace to avoid collisions
		$namespace = '__' . $namespace;

		if ($this->getState() !== 'active')
		{
			return;
		}

		$old = isset($_SESSION[$namespace][$name]) ? $_SESSION[$namespace][$name] : null;

		if ($value === null)
		{
			unset($_SESSION[$namespace][$name]);
		}
		else
		{
			$_SESSION[$namespace][$name] = $value;
		}

		return $old;
	}
public function set ( $ name , $ value = null , $ namespace = 'default' ) { // Add prefix to namespace to avoid collisions $ namespace = '__' . $ namespace ; if ( $ this -> getState ( ) !== 'active' ) { return ; } $ old = isset ( $ _SESSION [ $ namespace ] [ $ name ] ) ? $ _SESSION [ $ namespace ] [ $ name ] : null ; if ( $ value === null ) { unset ( $ _SESSION [ $ namespace ] [ $ name ] ) ; } else { $ _SESSION [ $ namespace ] [ $ name ] = $ value ; } return $ old ; }
Set data into the session store.

@param   string  $name       Name of a variable.
@param   mixed   $value      Value of a variable.
@param   string  $namespace  Namespace to use, default to 'default' {@deprecated 2.0 Namespace support will be removed.}

@return  mixed  Old value of a variable.

@since   1.0
Set data into the session store .