Class Request
An HTTP request.
<?php use ICanBoogie\HTTP\Request; # Creating the main request $request = Request::from($_SERVER); # Creating a request from scratch, with the current environment. $request = Request::from(array( 'uri' => '/path/to/my/page.html?page=2', 'user_agent' => 'Mozilla' 'is_get' => true, 'is_xhr' => true, 'is_local' => true ), array($_SERVER));
- ICanBoogie\Object implements ICanBoogie\ToArrayRecursive uses ICanBoogie\ToArrayRecursiveTrait, ICanBoogie\PrototypeTrait
- ICanBoogie\HTTP\Request implements ArrayAccess, IteratorAggregate
See: http://en.wikipedia.org/wiki/Uniform_resource_locator
Located at vendor/icanboogie/http/lib/request.php
Methods summary
public static
|
|
protected
|
|
public static
|
|
public static
array
|
|
protected
|
#
__construct( array $env = [] )
Initialize the properties |
public
|
|
public
mixed
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
|
protected
string
|
|
protected
|
|
protected
integer|null
|
|
protected
string|null
|
|
protected
string|null
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
string
|
|
protected
|
|
protected
string
|
|
protected
integer
|
|
protected
string
|
|
protected
string
|
#
get_normalized_path( )
Returns the $path property normalized using the |
protected
mixed
|
|
protected
|
|
protected
array
|
#
lazy_get_params( )
Returns the union of the |
Methods inherited from ICanBoogie\Object
resolve_facade_properties()
,
resolve_private_properties()
,
to_array()
,
to_json()
Methods inherited from ICanBoogie\ToArrayRecursive
Methods used from ICanBoogie\ToArrayRecursiveTrait
Methods used from ICanBoogie\PrototypeTrait
__get()
,
__set()
,
__sleep()
,
__wakeup()
,
get_prototype()
,
has_method()
,
has_property()
,
last_chance_get()
,
last_chance_set()
Magic methods summary
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
Constants summary
string |
METHOD_ANY
|
'ANY' |
|
string |
METHOD_CONNECT
|
'CONNECT' |
|
string |
METHOD_DELETE
|
'DELETE' |
|
string |
METHOD_GET
|
'GET' |
|
string |
METHOD_HEAD
|
'HEAD' |
|
string |
METHOD_OPTIONS
|
'OPTIONS' |
|
string |
METHOD_POST
|
'POST' |
|
string |
METHOD_PUT
|
'PUT' |
|
string |
METHOD_PATCH
|
'PATCH' |
|
string |
METHOD_TRACE
|
'TRACE' |
Properties summary
public static
array
|
$methods | |
protected static
|
$current_request |
#
Current request. |
public
array
|
$path_params |
#
Parameters extracted from the request path. |
public
array
|
$query_params |
#
Parameters defined by the query string. |
public
array
|
$request_params |
#
Parameters defined by the request body. |
public
array
|
$params | |
protected
|
$context |
#
General purpose container. |
public
|
$headers |
#
The headers of the request. |
protected
array
|
$env |
#
Request environment. |
protected
|
$files |
#
Files associated with the request. |
protected
|
$previous |
#
Previous request. |
Magic properties
public read-only
|
$context |
|
#
the request's context. |
public read-only
|
$previous |
|
#
Previous request. |
public read-only
|
$files |
|
#
The files associated with the request. |
public read-only
boolean
|
$authorization |
|
#
Authorization of the request. |
public read-only
integer
|
$content_length |
|
#
Length of the request content. |
public read-only
integer
|
$cache_control |
|
#
A |
public read-only
string
|
$ip |
|
#
Remote IP of the request. |
public read-only
boolean
|
$is_delete |
|
#
Is this a |
public read-only
boolean
|
$is_get |
|
#
Is this a |
public read-only
boolean
|
$is_head |
|
#
Is this a |
public read-only
boolean
|
$is_options |
|
#
Is this a |
public read-only
boolean
|
$is_patch |
|
#
Is this a |
public read-only
boolean
|
$is_post |
|
#
Is this a |
public read-only
boolean
|
$is_put |
|
#
Is this a |
public read-only
boolean
|
$is_trace |
|
#
Is this a |
public read-only
boolean
|
$is_local |
|
#
Is this a local request? |
public read-only
boolean
|
$is_xhr |
|
#
Is this an Ajax request? |
public read-only
string
|
$method |
|
#
Method of the request. |
public read-only
string
|
$normalized_path |
|
#
Path of the request normalized using the |
public read-only
string
|
$path |
|
#
Path info of the request. |
public read-only
integer
|
$port |
|
#
Port of the request. |
public read-only
string
|
$query_string |
|
#
Query string of the request. |
public read-only
string
|
$script_name |
|
#
Name of the entered script. |
public read-only
string
|
$referer |
|
#
Referer of the request. |
public read-only
string
|
$user_agent |
|
#
User agent of the request. |
public read-only
string
|
$uri |
|
#
URI of the request. The |