SymfonyComponentHttpFoundationCookie

Represents a cookie

Summary

No protected methods found
N/A
No private methods found
No private properties found
N/A
File
vendorSymfonyComponentHttpFoundationCookie.php
Package
Default
Class hierarchy
SymfonyComponentHttpFoundationCookie

Tags

author

Johannes M. Schmitt schmittjoh@gmail.com

api

Properties

$name

$name : 

Type

Tags

None found

$value

$value : 

Type

Tags

None found

$domain

$domain : 

Type

Tags

None found

$expire

$expire : 

Type

Tags

None found

$path

$path : 

Type

Tags

None found

$secure

$secure : 

Type

Tags

None found

$httpOnly

$httpOnly : 

Type

Tags

None found

Methods

__construct()

__construct(string  $name, string  $value = null, integer|string|\DateTime  $expire, string  $path = '/', string  $domain = null, Boolean  $secure = false, Boolean  $httpOnly = true) 

Constructor.

Parameters

string $name

The name of the cookie

string $value

The value of the cookie

integer|string|DateTime $expire

The time the cookie expires

string $path

The path on the server in which the cookie will be available on

string $domain

The domain that the cookie is available to

Boolean $secure

Whether the cookie should only be transmitted over a secure HTTPS connection from the client

Boolean $httpOnly

Whether the cookie will be made accessible only through the HTTP protocol

Throws

InvalidArgumentException

Tags

api

__toString()

__toString() : string

Returns the cookie as a string.

Returns

string —

The cookie

Tags

None found

getName()

getName() : string

Gets the name of the cookie.

Returns

string

Tags

api

getValue()

getValue() : string

Gets the value of the cookie.

Returns

string

Tags

api

getDomain()

getDomain() : string

Gets the domain that the cookie is available to.

Returns

string

Tags

api

getExpiresTime()

getExpiresTime() : integer

Gets the time the cookie expires.

Returns

integer

Tags

api

getPath()

getPath() : string

Gets the path on the server in which the cookie will be available on.

Returns

string

Tags

api

isSecure()

isSecure() : Boolean

Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.

Returns

Boolean

Tags

api

isHttpOnly()

isHttpOnly() : Boolean

Checks whether the cookie will be made accessible only through the HTTP protocol.

Returns

Boolean

Tags

api

isCleared()

isCleared() : Boolean

Whether this cookie is about to be cleared

Returns

Boolean

Tags

api