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();

Init

Init the class:

$request->init();

Globals

Get item from globals:

$request->get(string $key, string $index);

Set item to globals:

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

Server

Get item from server:

$request->getServer(string $key);

Set item to server:

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

Query

Get item from query:

$request->getQuery(string $key);

Set item to query:

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

Post

Get item from post:

$request->getPost(string $key);

Set item to post:

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

Files

Get item from files:

$request->getFiles(string $key);

Set item to files:

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

Session

Get item from session:

$request->getSession(string $key);

Set item to session:

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

Refresh the session:

$request->refreshSession();

Cookie

Get item from cookie:

$request->getCookie(string $key);

Set item to cookie:

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

Refresh the cookie:

$request->refreshCookie();
Edit on GitHub

Server Bundle

Directory

Get the directory:

$directory = new Server\Directory(Request $request);
$directory->getOutput();

File

Get the file:

$file = new Server\File(Request $request);
$file->getOutput();

Host

Get the host:

$host = new Server\Host(Request $request);
$host->getOutput();

Protocol

Get the protocol:

$protocol = new Server\Protocol(Request $request);
$protocol->getOutput();

Root

Get the root:

$root = new Server\Root(Request $request);
$root->getOutput();

Token

Get the token:

$token = new Server\Token(Request $request);
$token->getOutput();
Edit on GitHub

Validator Bundle

Access

Validate the access:

$validator = new Validator\Access();
$validator->validate(string $access, string $groups);

Alias

Validate the alias:

$validator = new Validator\Alias();
$validator->validate(string $alias, integer $mode);

Captcha

Validate the captcha:

$validator = new Validator\Captcha();
$validator->validate(string $task, string $hash);

DNS

Validate the DNS:

$validator = new Validator\Dns();
$validator->validate(string $host, string $type);

Email

Validate the email:

$validator = new Validator\Email();
$validator->validate(string $email, boolean $dns);

Login

Validate the login:

$validator = new Validator\Login();
$validator->validate(string $login);

Password

Validate the password:

$validator = new Validator\Password();
$validator->validate(string $password, string $hash);

Search

Validate the search:

$validator = new Validator\Search();
$validator->validate(string $search, string $placeholder);

URL

Validate the URL:

$validator = new Validator\Url();
$validator->validate(string $url, boolean $dns);
Edit on GitHub