Swoole

Class Swoole

package

Ascmvc\Session

Methods

Swoole constructor.

__construct(\swoole_http_request $request, \swoole_http_response $response) 

Arguments

$request

\swoole_http_request

$response

\swoole_http_response

Gets the cookie from the Swoole Request object.

getCookie(string $name = '') : null

Arguments

$name

string

Response

null

Returns the equivalent of the $_SERVER array from the Swoole environment.

getServerGlobalEnv() : mixed

Response

mixed

Sets the cookie in the Swoole Response object.

setCookie(string $name, string $value = "", integer $expire, string $path = "", string $domain = "", boolean $secure = false, boolean $httponly = false) : mixed

Arguments

$name

string

$value

string

$expire

integer

$path

string

$domain

string

$secure

boolean

$httponly

boolean

Response

mixed

Sets the \swoole_http_request object.

setRequest(\swoole_http_request|null $request = null) : $this|\swoole_http_request

Arguments

$request

\swoole_http_request|null

Response

$this|\swoole_http_request

Sets the \swoole_http_response object.

setResponse(\swoole_http_response|null $response = null) : $this|\swoole_http_response

Arguments

$response

\swoole_http_response|null

Response

$this|\swoole_http_response

Properties

Contains a swoole_http_request instance.

request : \swoole_http_request
var

Type(s)

\swoole_http_request

Contains a swoole_http_response instance.

response : \swoole_http_response
var

Type(s)

\swoole_http_response