\app\framework\Component\Route\KleinResponseCookie

ResponseCookie

Class to represent an HTTP response cookie

Summary

Methods
Properties
Constants
__construct()
getName()
setName()
getValue()
setValue()
getExpire()
setExpire()
getPath()
setPath()
getDomain()
setDomain()
getSecure()
setSecure()
getHttpOnly()
setHttpOnly()
No public properties found
No constants found
No protected methods found
$name
$value
$expire
$path
$domain
$secure
$http_only
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : 

The name of the cookie

Type

$value

$value : 

The string "value" of the cookie

Type

$expire

$expire : 

The date/time that the cookie should expire

Represented by a Unix "Timestamp"

Type

$path

$path : 

The path on the server that the cookie will be available on

Type

$domain

$domain : 

The domain that the cookie is available to

Type

$secure

$secure : 

Whether the cookie should only be transferred over an HTTPS connection or not

Type

$http_only

$http_only : 

Whether the cookie will be available through HTTP only (not available to be accessed through client-side scripting languages like JavaScript)

Type

Methods

__construct()

__construct(string  $name, string  $value = null, integer  $expire = null, string  $path = null, string  $domain = null, boolean  $secure = false, boolean  $http_only = false) 

Constructor

Parameters

string $name

The name of the cookie

string $value

The value to set the cookie with

integer $expire

The time that the cookie should expire

string $path

The path of which to restrict the cookie

string $domain

The domain of which to restrict the cookie

boolean $secure

Flag of whether the cookie should only be sent over a HTTPS connection

boolean $http_only

Flag of whether the cookie should only be accessible over the HTTP protocol

getName()

getName() : string

Gets the cookie's name

Returns

string

getValue()

getValue() : string

Gets the cookie's value

Returns

string

getExpire()

getExpire() : integer

Gets the cookie's expire time

Returns

integer

setExpire()

setExpire(integer  $expire) : \app\framework\Component\Route\Klein\ResponseCookie

Sets the cookie's expire time

The time should be an integer representing a Unix timestamp

Parameters

integer $expire

Returns

\app\framework\Component\Route\Klein\ResponseCookie

getPath()

getPath() : string

Gets the cookie's path

Returns

string

getDomain()

getDomain() : string

Gets the cookie's domain

Returns

string

getSecure()

getSecure() : boolean

Gets the cookie's secure only flag

Returns

boolean

getHttpOnly()

getHttpOnly() : boolean

Gets the cookie's HTTP only flag

Returns

boolean