src/Http/Cookie.php
public function set($key, $value, $time = 0)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                setcookie($k, $v, ($time == 0 ? 0 : time() + $time), '/');
                $_COOKIE[$k] = $v;
            }
        } else {
            setcookie($key, $value, ($time == 0 ? 0 : time() + $time), '/');
            $_COOKIE[$key] = $value;
        }

        return;
    }
public function set($key, $value, $time = 0)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                setcookie($k, $v, ($time == 0 ? 0 : time() + $time), '/');
                $_COOKIE[$k] = $v;
            }
        } else {
            setcookie($key, $value, ($time == 0 ? 0 : time() + $time), '/');
            $_COOKIE[$key] = $value;
        }

        return;
    }
Set cookie method.

@param string  $key
@param string  $value
@param integer $time

@return void