Ejemplo n.º 1
0
        }
    }
    static function get($name, $default = null)
    {
        if (arr::hasKey(self::$cookies, $name)) {
            return self::$cookies[$name];
        } else {
            return $default;
        }
    }
    static function clr($name)
    {
        if (headers_sent()) {
            // Put the deletion cookie in the jar if the headers have been sent
            self::$jar[] = array($name, '', time() - 3600);
            session::set('__cookiejar', self::$jar);
        } else {
            // Otherwise clear the cookie immediately
            setcookie($name, '', time() - 3600);
        }
    }
    /**
     * @brief Inspect the state of the request
     */
    static function inspect()
    {
        debug::inspect(self::$cookies);
    }
}
Cookies::initialize();