Request Helper - personaclix/PersonaClixEngine GitHub Wiki

The Request Helper is designed to give information related to the current request made.

To start using the helper, you must add a use statement to the top of the file.

use \PersonaClix\Engine\Helpers\Request;

HTTPS

Returns true if the connection is secured with HTTPS or false otherwise.

if( Request::https() ) {
	echo "The connection is secure.";
}

Host

Returns a string with the requested Hostname (e.g. www.example.com).

$host = Request::host();

URI

Returns a string with the requested URI (e.g. /something).

$uri = Request::uri();

GET

Takes the name of the GET Request Variable as a string and returns its value as a string if set or an empty string if not.

$name = Request::get('name');

POST

Takes the name of the POST Request Variable as a string and returns its value as a string if set or an empty string if not.

$name = Request::post('name');
⚠️ **GitHub.com Fallback** ⚠️