public function setVariable(string $key, $value): View
    {
        $this->variables[$key] = $value;

        return $this;
    }
public function setVariable(string $key, $value): View
    {
        $this->variables[$key] = $value;

        return $this;
    }
public function setVariable ( string $ key , $ value ) : View { $ this -> variables [ $ key ] = $ value ; return $ this ; }
Set a single variable.

@param string $key   The variable key to set
@param mixed  $value The value to set

@return \Valkyrja\View\View
Set a single variable .