PHP Class Lime\Helper\Cookie

Inheritance: extends Lime\Helper
Show file Open project: sjardim/Hugopit

Protected Properties

Property Type Description
$_cookies array
$_deleted_cookies array

Public Methods

Method Description
delete ( string $name, $path = '/', $domain = '', $secure = false, $http_only = false ) : boolean deletes a cookie
get ( string $name ) : mixed gets a cookie
getAndDelete ( string $name, $path = '/', $domain = '', $secure = false, $http_only = false ) : mixed gets a cookie and eats it
set ( string $name, string $value, mixed $ttl = 86400, string $path = '/', string $domain = '', boolean $secure = false, boolean $http_only = false ) : boolean sets a cookie

Method Details

delete() public method

deletes a cookie
public delete ( string $name, $path = '/', $domain = '', $secure = false, $http_only = false ) : boolean
$name string
return boolean

get() public method

gets a cookie
public get ( string $name ) : mixed
$name string
return mixed

getAndDelete() public method

gets a cookie and eats it
public getAndDelete ( string $name, $path = '/', $domain = '', $secure = false, $http_only = false ) : mixed
$name string
return mixed

set() public method

sets a cookie
public set ( string $name, string $value, mixed $ttl = 86400, string $path = '/', string $domain = '', boolean $secure = false, boolean $http_only = false ) : boolean
$name string
$value string
$ttl mixed
$path string
$domain string
$secure boolean
$http_only boolean
return boolean

Property Details

$_cookies protected property

protected array $_cookies
return array

$_deleted_cookies protected property

protected array $_deleted_cookies
return array