Ubiquity 2.5.2
php rapid development framework
|
Http Request utilities, wrapper for accessing to $_GET, $_POST and php://input. More...
Static Public Member Functions | |
static | setValuesToObject ($object, $values=null) |
Affects member to member the values of the associative array $values to the members of the object $object Used for example to retrieve the variables posted and assign them to the members of an object. | |
static | setGetValuesToObject ($object) |
Affects member to member the values of $_GET to the members of the object $object $object must have accessors to each members. | |
static | setPostValuesToObject ($object) |
Affects member to member the values of $_POST to the members of the object $object $object must have accessors to each members. | |
static | getPost ($function='htmlentities') |
Call a cleaning function on the post. | |
static | getInput () |
Returns the query data, for PUT, DELETE PATCH methods. | |
static | getDatas () |
Returns the query data, regardless of the method. | |
static | set (string $key, $value=true) |
Adds a value in request at $key position. | |
static | getDefaultLanguage () |
Copyright © 2008 Darrin Yeager https://www.dyeager.org/ Licensed under BSD license. | |
static | setLocale (string $locale) |
static | get (string $key, $default=NULL) |
Returns the value of the $key variable passed by the get method or $default if the $key variable does not exist. | |
static | getBoolean (string $key) |
Returns a boolean at the key position in request. | |
static | post (string $key, $default=NULL) |
Returns the value of the $key variable passed by the post method or $default if the $key variable does not exist. | |
static | getUrl ($url) |
static | getUrlParts () |
static | getMethod () |
Returns the http method. | |
static | getOrigin () |
Returns the request origin. | |
static | cleanUrl ($url) |
static | getRealInput ($source='post') |
Fix up PHP's messing up input containing dots, etc. | |
static | getRealGET () |
static | getRealPOST () |
static | password_hash (string $key, string $algo=PASSWORD_DEFAULT) |
Creates a password hash for a posted value at $key position. | |
static | password_verify (string $passwordKey, string $hash) |
Verifies that a posted password matches a hash at $passwordKey position. | |
static | parseURI (string $uri, string $basedir) |
Internal use for async servers (Swoole and Workerman). | |
static | filter (string $key, int $type=\INPUT_POST, int $filter=\FILTER_DEFAULT, $default=null) |
Gets a specific external variable by name and optionally filters it. | |
static | filterPost (string $key, int $filter=\FILTER_DEFAULT, $default=null) |
Gets a specific POST variable by name and optionally filters it. | |
static | filterGet (string $key, int $filter=\FILTER_DEFAULT, $default=null) |
Gets a specific GET variable by name and optionally filters it. | |
Static Public Member Functions inherited from URequestTesterTrait | |
static | filled ($key) |
Tests if a value is present on the request and is not empty. | |
static | has ($key) |
Tests if a value is present on the request. | |
static | isAjax () |
Returns true if the request is an Ajax request. | |
static | isPost () |
Returns true if the request is sent by the POST method. | |
static | isCrossSite () |
Returns true if the request is cross site. | |
static | isJSON () |
Returns true if request contentType is set to json. | |
static | getContentType () |
Returns the request content-type header. | |
Static Private Member Functions | |
static | parseDefaultLanguage ($http_accept, $deflang='en') |
static | _parseURI (string $uri, string $basedir) |
Static Private Attributes | |
static | $uriInfos |
Http Request utilities, wrapper for accessing to $_GET, $_POST and php://input.
Ubiquity\utils\http$URequest This class is part of Ubiquity
Definition at line 18 of file URequest.php.
|
staticprivate |
Definition at line 336 of file URequest.php.
|
static |
Definition at line 229 of file URequest.php.
|
static |
Gets a specific external variable by name and optionally filters it.
string | $key | |
int | $type | |
int | $filter | |
mixed | null | $default |
Definition at line 310 of file URequest.php.
|
static |
Gets a specific GET variable by name and optionally filters it.
string | $key | |
int | $filter | |
mixed | null | $default |
Definition at line 332 of file URequest.php.
|
static |
Gets a specific POST variable by name and optionally filters it.
string | $key | |
int | $filter | |
mixed | null | $default |
Definition at line 321 of file URequest.php.
|
static |
Returns the value of the $key variable passed by the get method or $default if the $key variable does not exist.
string | $key | |
mixed | $default | return value by default |
Definition at line 168 of file URequest.php.
|
static |
Returns a boolean at the key position in request.
string | $key | the key to add or set |
Definition at line 178 of file URequest.php.
|
static |
Returns the query data, regardless of the method.
Definition at line 86 of file URequest.php.
|
static |
Copyright © 2008 Darrin Yeager https://www.dyeager.org/ Licensed under BSD license.
https://www.dyeager.org/downloads/license-bsd.txt
Definition at line 120 of file URequest.php.
|
static |
Returns the query data, for PUT, DELETE PATCH methods.
Definition at line 77 of file URequest.php.
|
static |
|
static |
|
static |
Call a cleaning function on the post.
string | $function | the cleaning function, default htmlentities |
Definition at line 70 of file URequest.php.
|
static |
Definition at line 254 of file URequest.php.
|
static |
Fix up PHP's messing up input containing dots, etc.
$source
can be either 'post' or 'get'
string | $source |
Definition at line 242 of file URequest.php.
|
static |
Definition at line 258 of file URequest.php.
|
static |
Definition at line 197 of file URequest.php.
|
static |
Definition at line 206 of file URequest.php.
|
staticprivate |
Definition at line 127 of file URequest.php.
|
static |
Internal use for async servers (Swoole and Workerman).
string | $uri | |
string | $basedir |
Definition at line 298 of file URequest.php.
|
static |
Creates a password hash for a posted value at $key position.
string | $key | |
string | $algo |
Definition at line 269 of file URequest.php.
|
static |
Verifies that a posted password matches a hash at $passwordKey position.
string | $passwordKey | |
string | $hash |
Definition at line 285 of file URequest.php.
|
static |
Returns the value of the $key variable passed by the post method or $default if the $key variable does not exist.
string | $key | |
mixed | $default | return value by default |
Definition at line 193 of file URequest.php.
|
static |
Adds a value in request at $key position.
string | $key | |
mixed | $value |
Definition at line 110 of file URequest.php.
|
static |
Affects member to member the values of $_GET to the members of the object $object $object must have accessors to each members.
object | $object |
Definition at line 50 of file URequest.php.
|
static |
Definition at line 150 of file URequest.php.
|
static |
Affects member to member the values of $_POST to the members of the object $object $object must have accessors to each members.
object | $object |
Definition at line 60 of file URequest.php.
|
static |
Affects member to member the values of the associative array $values to the members of the object $object Used for example to retrieve the variables posted and assign them to the members of an object.
object | $object | |
array | $values |
Definition at line 31 of file URequest.php.
|
staticprivate |
Definition at line 23 of file URequest.php.