Properties

$instance

$instance : \Pop\Cookie\Cookie

Instance of the cookie object

Type

\Pop\Cookie\Cookie

$ip

$ip : string

Cookie IP

Type

string

$expire

$expire : integer

Cookie Expiration

Type

integer

$path

$path : string

Cookie Path

Type

string

$domain

$domain : string

Cookie Domain

Type

string

$secure

$secure : boolean

Cookie Secure Flag

Type

boolean

$httponly

$httponly : boolean

Cookie HTTP Only Flag

Type

boolean

Methods

setOptions()

setOptions(array  $options = array()) : \Pop\Cookie\Cookie

Private method to set options

Parameters

array $options

Returns

\Pop\Cookie\Cookie

getInstance()

getInstance(array  $options = array()) : \Pop\Cookie\Cookie

Determine whether or not an instance of the cookie object exists already, and instantiate the object if it does not exist.

Parameters

array $options

Returns

\Pop\Cookie\Cookie

set()

set(string  $name, mixed  $value, array  $options = null) : \Pop\Cookie\Cookie

Set a cookie

Parameters

string $name
mixed $value
array $options

Returns

\Pop\Cookie\Cookie

getExpire()

getExpire() : integer

Return the current cookie expiration

Returns

integer

getPath()

getPath() : string

Return the current cookie path.

Returns

string

getDomain()

getDomain() : string

Return the current cookie domain

Returns

string

isSecure()

isSecure() : boolean

Return if the cookie is secure

Returns

boolean

isHttpOnly()

isHttpOnly() : boolean

Return if the cookie is HTTP only

Returns

boolean

getIp()

getIp() : string

Return the current IP address.

Returns

string

delete()

delete(string  $name, array  $options = null) : void

Delete a cookie

Parameters

string $name
array $options

clear()

clear(array  $options = null) : void

Clear (delete) all cookies

Parameters

array $options

count()

count() : integer

Method to get the count of cookie data

Returns

integer

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the cookie

Returns

\ArrayIterator

toArray()

toArray() : array

Get the cookie values as an array

Returns

array

__set()

__set(string  $name, mixed  $value) : void

Set method to set the value of the $_COOKIE global variable

Parameters

string $name
mixed $value

__get()

__get(string  $name) : mixed

Get method to return the value of the $_COOKIE global variable

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

Return the isset value of the $_COOKIE global variable

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Unset the value in the $_COOKIE global variable

Parameters

string $name

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

__construct()

__construct(array  $options = array()) 

Constructor

Private method to instantiate the cookie object

Parameters

array $options