helpers/cookie – Kohana API 2.3 Documentation

system/helpers/cookie.php

Class: cookie_Core

class cookie_Core

Cookie helper class.


Methods

cookie_Core :: set

public static function set

Sets a cookie with the given parameters.

Parameters:

string name
cookie name or array of config options
string value
(NULL) cookie value
integer expire
(NULL) number of seconds before the cookie expires
string path
(NULL) URL path to allow
string domain
(NULL) URL domain to allow
boolean secure
(NULL) HTTPS only
boolean httponly
(NULL) HTTP only (requires PHP 5.2 or higher)

Return: boolean


cookie_Core :: get

public static function get

Fetch a cookie value, using the Input library.

Parameters:

string name
cookie name
mixed default
(NULL) default value
boolean xss_clean
(FALSE) use XSS cleaning on the value

Return: string


cookie_Core :: delete

public static function delete

Nullify and unset a cookie.

Parameters:

string name
cookie name
string path
(NULL) URL path
string domain
(NULL) URL domain

Return: boolean