SproutCMS

This is the code documentation for the SproutCMS project

class Cookie

Eases reading and writing cookies.

Source code (3 results)

/sprout/Helpers/Cookie.php   Highlighted file source

Line 21: * Eases reading and writing cookies.
Line 23: class Cookie
Line 27: * Sets a cookie with the given parameters.
Line 29: * @param string cookie name
Line 30: * @param string cookie value
Line 31: * @param integer number of seconds before the cookie expires
Line 44: $config = Kohana::config('cookie');
Line 57: return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
Line 61: * Fetch a cookie value
Line 63: * @param string cookie name
Line 69: return (isset($_COOKIE[$name]) ? $_COOKIE[$name] : $default);
Line 73: * Nullify and unset a cookie.
Line 75: * @param string cookie name
Line 82: if ( ! isset($_COOKIE[$name]))
Line 85: // Delete the cookie from globals
Line 86: unset($_COOKIE[$name]);
Line 88: // Sets the cookie value to an empty string, and the expiration to 24 hours ago
Line 89: return Cookie::set($name, '', -86400, $path, $domain, FALSE, FALSE);
Line 92: } // End cookie

/sprout/Helpers/Session.php   Highlighted file source

Line 86: // Regenerate session id and update session cookie
Line 91: // the session cookie(s) can be written.
Line 152: // Name the session, this will also be the name of the cookie
Line 155: // Set the session cookie parameters
Line 156: session_set_cookie_params
Line 159: Kohana::config('cookie.path'),
Line 160: Kohana::config('cookie.domain'),
Line 161: Kohana::config('cookie.secure'),
Line 162: true // never allow javascript to access session cookies
Line 236: // Note: also sets a new session cookie with the updated id
Line 251: if (isset($_COOKIE[$name]))
Line 253: // Change the cookie value to match the new session id to prevent "lag"
Line 254: Cookie::set(
Line 258: Kohana::config('cookie.path'),
Line 259: Kohana::config('cookie.domain'),
Line 260: Kohana::config('cookie.secure'),
Line 284: // Delete the session cookie
Line 285: Cookie::delete($name);

/sprout/Helpers/Session.php   Highlighted file source

Line 86: // Regenerate session id and update session cookie
Line 91: // the session cookie(s) can be written.
Line 152: // Name the session, this will also be the name of the cookie
Line 155: // Set the session cookie parameters
Line 156: session_set_cookie_params
Line 159: Kohana::config('cookie.path'),
Line 160: Kohana::config('cookie.domain'),
Line 161: Kohana::config('cookie.secure'),
Line 162: true // never allow javascript to access session cookies
Line 236: // Note: also sets a new session cookie with the updated id
Line 251: if (isset($_COOKIE[$name]))
Line 253: // Change the cookie value to match the new session id to prevent "lag"
Line 254: Cookie::set(
Line 258: Kohana::config('cookie.path'),
Line 259: Kohana::config('cookie.domain'),
Line 260: Kohana::config('cookie.secure'),
Line 284: // Delete the session cookie
Line 285: Cookie::delete($name);

A total of 55 lines in 3 files were found