PHP Interface ManaPHP\Http\CookiesInterface

Datei anzeigen Open project: manaphp/manaphp

Public Methods

Method Description
delete ( string $name ) : boolean Deletes a cookie by its name This method does not removes cookies from the $_COOKIE
get ( string $name ) : mixed Gets a cookie from the bag
has ( string $name ) : boolean Check if a cookie is defined in the bag or exists in the $_COOKIE
send ( ) Sends the cookies to the client
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

Method Details

delete() public method

Deletes a cookie by its name This method does not removes cookies from the $_COOKIE
public delete ( string $name ) : boolean
$name string
return boolean

get() public method

Gets a cookie from the bag
public get ( string $name ) : mixed
$name string
return mixed

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
public send ( )

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