\CheddarGetter_Http_NativeAdapter

Adapter implementation using PHP superglobals for getting and setting http related data

Summary

Methods
Properties
Constants
hasCookie()
getCookie()
setCookie()
getRequestValue()
hasReferrer()
getReferrer()
hasIp()
getIp()
No public properties found
No constants found
_getIp()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

hasCookie()

hasCookie(string $name) : boolean

Checks whether a cookie exists.

Parameters

string $name

Cookie name

Returns

boolean

getCookie()

getCookie(string $name) : mixed

Gets the value of a cookie.

Parameters

string $name

Cookie name

Returns

mixed

setCookie()

setCookie(string $name, string $data, int $expire, string $path, string $domain, boolean $secure, boolean $httpOnly)

Sets the value of a cookie.

Parameters

string $name

Cookie name

string $data

Value of the cookie

int $expire
string $path
string $domain
boolean $secure
boolean $httpOnly

getRequestValue()

getRequestValue(string $key) : mixed

Get a value from the request (get/post/cookie)

null is returned if the key is not set.

Parameters

string $key

Returns

mixed

hasReferrer()

hasReferrer() : boolean

Check if the http referrer is set

Returns

boolean

getReferrer()

getReferrer() : string

Get the http referrer

Returns

string

hasIp()

hasIp() : boolean

Check if the remote IP is known

Returns

boolean

getIp()

getIp() : string

Get the remote ip

Returns

string

_getIp()

_getIp()

Really get the IP