PHP Class ManaPHP\Http\Cookies

Inheritance: extends ManaPHP\Component, implements ManaPHP\Http\CookiesInterface
Datei anzeigen Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_cookies array
$_deletedCookies array

Public Methods

Method Description
delete ( string $name ) : static Deletes a cookie by its name
get ( string $name ) : mixed | null Gets a cookie
has ( string $name ) : boolean Check if a cookie is defined in the bag or exists in the $_COOKIE
send ( ) : void Sends the cookies to the client Cookies are not sent if headers are sent in the current request
set ( string $name, mixed $value, integer $expire, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = true ) : static Sets a cookie to be sent at the end of the request

Protected Methods

Method Description
_decrypt ( string $value ) : string
_encrypt ( string $value ) : string

Method Details

_decrypt() protected method

protected _decrypt ( string $value ) : string
$value string
return string

_encrypt() protected method

protected _encrypt ( string $value ) : string
$value string
return string

delete() public method

Deletes a cookie by its name
public delete ( string $name ) : static
$name string
return static

get() public method

Gets a cookie
public get ( string $name ) : mixed | null
$name string
return mixed | null

has() public method

Check if a cookie is defined in the bag or exists in the $_COOKIE
public has ( string $name ) : boolean
$name string
return boolean

send() public method

Sends the cookies to the client Cookies are not sent if headers are sent in the current request
public send ( ) : void
return void

set() public method

Sets a cookie to be sent at the end of the request
public set ( string $name, mixed $value, integer $expire, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = true ) : static
$name string
$value mixed
$expire integer
$path string
$domain string
$secure boolean
$httpOnly boolean
return static

Property Details

$_cookies protected_oe property

protected array $_cookies
return array

$_deletedCookies protected_oe property

protected array $_deletedCookies
return array