\duncan3dc\SessionsCookie

Summary

Methods
Properties
Constants
createFromIni()
withLifetime()
getLifetime()
withPath()
getPath()
withDomain()
getDomain()
withSecure()
isSecure()
withHttpOnly()
isHttpOnly()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$lifetime
$path
$domain
$secure
$httponly
N/A

Properties

$lifetime

$lifetime : integer

Type

integer — The lifetime of the session cookie in seconds.

$path

$path : string

Type

string — Path on the domain where the cookie will work.

$domain

$domain : string

Type

string — The domain the cookie should be sent to.

$secure

$secure : boolean

Type

boolean — Only send over secure connections.

$httponly

$httponly : boolean

Type

boolean — Use the HTTP only flag.

Methods

createFromIni()

createFromIni() 

Create a new instance from the current environment settings.

withLifetime()

withLifetime(integer  $lifetime) : static

Create a new instance with the specified lifetime.

Parameters

integer $lifetime

The lifetime of the session cookie in seconds.

Returns

static

getLifetime()

getLifetime() : integer

Get the current lifetime in seconds.

Returns

integer —

The lifetime of the session cookie in seconds.

withPath()

withPath(string  $path) : static

Create a new instance with the path.

Parameters

string $path

Path on the domain where the cookie will work.

Returns

static

getPath()

getPath() : string

Get the current path.

Returns

string

withDomain()

withDomain(string  $domain) : static

Create a new instance with the domain.

Parameters

string $domain

The domain the cookie should be sent to.

Returns

static

getDomain()

getDomain() 

Get the current domain.

withSecure()

withSecure(boolean  $secure) : static

Create a new instance with the secure flag.

Parameters

boolean $secure

Only send over secure connections.

Returns

static

isSecure()

isSecure() : boolean

Check if this cookie is secure or not.

Returns

boolean

withHttpOnly()

withHttpOnly(boolean  $httponly) : static

Create a new instance with the HTTP only flag.

Parameters

boolean $httponly

Use the HTTP only flag.

Returns

static

isHttpOnly()

isHttpOnly() : boolean

Check if this cookie is HTTP only or not.

Returns

boolean