class RequestContext
Holds information about the current request.
Methods
|
__construct(string $baseUrl = '', string $method = 'GET', string $host = 'localhost', string $scheme = 'http', integer $httpPort = 80, integer $httpsPort = 443, string $path = '/', string $queryString = '')
Constructor. |
||
| fromRequest(Request $request) | ||
| string |
getBaseUrl()
Gets the base URL. |
|
|
setBaseUrl(string $baseUrl)
Sets the base URL. |
||
| string |
getPathInfo()
Gets the path info. |
|
|
setPathInfo(string $pathInfo)
Sets the path info. |
||
| string |
getMethod()
Gets the HTTP method. |
|
|
setMethod(string $method)
Sets the HTTP method. |
||
| string |
getHost()
Gets the HTTP host. |
|
|
setHost(string $host)
Sets the HTTP host. |
||
| string |
getScheme()
Gets the HTTP scheme. |
|
|
setScheme(string $scheme)
Sets the HTTP scheme. |
||
| string |
getHttpPort()
Gets the HTTP port. |
|
|
setHttpPort(string $httpPort)
Sets the HTTP port. |
||
| string |
getHttpsPort()
Gets the HTTPS port. |
|
|
setHttpsPort(string $httpsPort)
Sets the HTTPS port. |
||
| string |
getQueryString()
Gets the query string. |
|
|
setQueryString(string $queryString)
Sets the query string. |
||
| array |
getParameters()
Returns the parameters. |
|
| Route |
setParameters(array $parameters)
Sets the parameters. |
|
| mixed |
getParameter(string $name)
Gets a parameter value. |
|
| Boolean |
hasParameter(string $name)
Checks if a parameter value is set for the given parameter. |
|
|
setParameter(string $name, mixed $parameter)
Sets a parameter value. |
Details
at line 53
public
__construct(string $baseUrl = '', string $method = 'GET', string $host = 'localhost', string $scheme = 'http', integer $httpPort = 80, integer $httpsPort = 443, string $path = '/', string $queryString = '')
Constructor.
at line 65
public
fromRequest(Request $request)
at line 82
public string
getBaseUrl()
Gets the base URL.
at line 94
public
setBaseUrl(string $baseUrl)
Sets the base URL.
at line 104
public string
getPathInfo()
Gets the path info.
at line 114
public
setPathInfo(string $pathInfo)
Sets the path info.
at line 126
public string
getMethod()
Gets the HTTP method.
The method is always an uppercased string.
at line 138
public
setMethod(string $method)
Sets the HTTP method.
at line 148
public string
getHost()
Gets the HTTP host.
at line 160
public
setHost(string $host)
Sets the HTTP host.
at line 170
public string
getScheme()
Gets the HTTP scheme.
at line 182
public
setScheme(string $scheme)
Sets the HTTP scheme.
at line 192
public string
getHttpPort()
Gets the HTTP port.
at line 204
public
setHttpPort(string $httpPort)
Sets the HTTP port.
at line 214
public string
getHttpsPort()
Gets the HTTPS port.
at line 226
public
setHttpsPort(string $httpsPort)
Sets the HTTPS port.
at line 236
public string
getQueryString()
Gets the query string.
at line 248
public
setQueryString(string $queryString)
Sets the query string.
at line 258
public array
getParameters()
Returns the parameters.
at line 272
public Route
setParameters(array $parameters)
Sets the parameters.
This method implements a fluent interface.
at line 286
public mixed
getParameter(string $name)
Gets a parameter value.
at line 298
public Boolean
hasParameter(string $name)
Checks if a parameter value is set for the given parameter.
at line 311
public
setParameter(string $name, mixed $parameter)
Sets a parameter value.