Gdn_Session::setAttribute PHP Method

setAttribute() public method

Sets a value in the $this->_Attributes array. This setting will persist only to the end of the page load. It is not intended for making permanent changes to user attributes.
public setAttribute ( string | array $Name, mixed $Value = '' )
$Name string | array
$Value mixed
    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;
        }
    }