public function set($key, $value)
	{
		if(array_key_exists($key, $this->scoped))
		{
			$val = $this->scoped[$key];
			
			if($value === NULL)
			{
				unset($this->scoped[$key]);
			}
			else
			{
				$this->scoped[$key] = $value;
			}
			
			return $val;
		}

		if($value !== NULL)
		{
			$this->scoped[$key] = $value;
		}
	}
public function set($key, $value)
	{
		if(array_key_exists($key, $this->scoped))
		{
			$val = $this->scoped[$key];
			
			if($value === NULL)
			{
				unset($this->scoped[$key]);
			}
			else
			{
				$this->scoped[$key] = $value;
			}
			
			return $val;
		}

		if($value !== NULL)
		{
			$this->scoped[$key] = $value;
		}
	}
public function set ( $ key , $ value ) { if ( array_key_exists ( $ key , $ this -> scoped ) ) { $ val = $ this -> scoped [ $ key ] ; if ( $ value === NULL ) { unset ( $ this -> scoped [ $ key ] ) ; } else { $ this -> scoped [ $ key ] = $ value ; } return $ val ; } if ( $ value !== NULL ) { $ this -> scoped [ $ key ] = $ value ; } }
Set the given variable in the scope and return the previous value if present, setting a value
of NULL will remove the value from the context.

@param string $key The name of the scoped variable to be set.
@param mixed $value The new value of the scoped variable or NULL to unset the variable.
@return mixed The previous value of the scoped variable.
Set the given variable in the scope and return the previous value if present setting a value of NULL will remove the value from the context .