Request Class

Get instance

Get the instance of the Request class:

$request = Request::getInstance();

Clear instance

Clear the instance of the Request class:

$request->clearInstance() : void;

Init

Init the class:

$request->init() : void;

Globals

Get the value from globals:

$request->get(string $key) : string|array|null;

Get the array from globals:

$request->getArray() : array;

Set the value to globals:

$request->set(string $key, string|array|null $value) : void;

Server

Get the value from server:

$request->getServer(string $key) : string|array|null;

Set the value to server:

$request->setServer(string $key, string|array|null $value) : void;

Query

Get the value from query:

$request->getQuery(string $key) : string|array|null;

Set the value to query:

$request->setQuery(string $key, string|array|null $value) : void;

Post

Get the value from post:

$request->getPost(string $key) : string|array|null;

Set the value to post:

$request->setPost(string $key, string|array|null $value) : void;

Files

Get the value from files:

$request->getFiles(string $key) : string|array|null;

Set the value to files:

$request->setFiles(string $key, string|array|null $value) : void;

Session

Get the value from session:

$request->getSession(string $key) : string|array|null;

Set the value to session:

$request->setSession(string $key, string|array|null $value) : void;

Refresh the session:

$request->refreshSession() : void;

Cookie

Get the value from cookie:

$request->getCookie(string $key) : string|array|null;

Set the value to cookie:

$request->setCookie(string $key, string|array|null $value) : void;

Refresh the cookie:

$request->refreshCookie() : void;
Edit on GitHub