Methods summary
public
|
#
__construct( string $baseUrl = '', string $method = 'GET', string $host = 'localhost', string $scheme = 'http', integer $httpPort = 80, integer $httpsPort = 443, string $path = '/', string $queryString = '' )
Constructor.
Parameters
- $baseUrl
string $baseUrl The base URL
- $method
string $method The HTTP method
- $host
string $host The HTTP host name
- $scheme
string $scheme The HTTP scheme
- $httpPort
integer $httpPort The HTTP port
- $httpsPort
integer $httpsPort The HTTPS port
- $path
string $path The path
- $queryString
string $queryString The query string
|
public
mixed
|
#
fromRequest( Symfony\Component\HttpFoundation\Request $request )
Updates the RequestContext information based on a HttpFoundation Request.
Updates the RequestContext information based on a HttpFoundation Request.
Parameters
- $request
Symfony\Component\HttpFoundation\Request $request A Request instance
Returns
mixed $this
|
public
string
|
#
getBaseUrl( )
Gets the base URL.
Returns
string The base URL
|
public
mixed
|
#
setBaseUrl( string $baseUrl )
Sets the base URL.
Parameters
- $baseUrl
string $baseUrl The base URL
Returns
mixed $this
|
public
string
|
#
getPathInfo( )
Gets the path info.
Returns
string The path info
|
public
mixed
|
#
setPathInfo( string $pathInfo )
Sets the path info.
Parameters
- $pathInfo
string $pathInfo The path info
Returns
mixed $this
|
public
string
|
#
getMethod( )
Gets the HTTP method.
The method is always an uppercased string.
Returns
string The HTTP method
|
public
mixed
|
#
setMethod( string $method )
Sets the HTTP method.
Parameters
- $method
string $method The HTTP method
Returns
mixed $this
|
public
string
|
#
getHost( )
Gets the HTTP host.
The host is always lowercased because it must be treated
case-insensitive.
Returns
string The HTTP host
|
public
mixed
|
#
setHost( string $host )
Sets the HTTP host.
Parameters
- $host
string $host The HTTP host
Returns
mixed $this
|
public
string
|
#
getScheme( )
Gets the HTTP scheme.
Returns
string The HTTP scheme
|
public
mixed
|
#
setScheme( string $scheme )
Sets the HTTP scheme.
Parameters
- $scheme
string $scheme The HTTP scheme
Returns
mixed $this
|
public
integer
|
#
getHttpPort( )
Gets the HTTP port.
Returns
integer The HTTP port
|
public
mixed
|
#
setHttpPort( integer $httpPort )
Sets the HTTP port.
Parameters
- $httpPort
integer $httpPort The HTTP port
Returns
mixed $this
|
public
integer
|
#
getHttpsPort( )
Gets the HTTPS port.
Returns
integer The HTTPS port
|
public
mixed
|
#
setHttpsPort( integer $httpsPort )
Sets the HTTPS port.
Parameters
- $httpsPort
integer $httpsPort The HTTPS port
Returns
mixed $this
|
public
string
|
#
getQueryString( )
Gets the query string.
Returns
string The query string without the "?"
|
public
mixed
|
#
setQueryString( string $queryString )
Sets the query string.
Parameters
- $queryString
string $queryString The query string (after "?")
Returns
mixed $this
|
public
array
|
#
getParameters( )
Returns the parameters.
Returns
array The parameters
|
public
mixed
|
#
setParameters( array $parameters )
Sets the parameters.
Parameters
- $parameters
array $parameters The parameters
Returns
mixed $this
|
public
mixed
|
#
getParameter( string $name )
Gets a parameter value.
Parameters
- $name
string $name A parameter name
Returns
mixed The parameter value or null if nonexistent
|
public
boolean
|
#
hasParameter( string $name )
Checks if a parameter value is set for the given parameter.
Checks if a parameter value is set for the given parameter.
Parameters
- $name
string $name A parameter name
Returns
boolean True if the parameter value is set, false otherwise
|
public
mixed
|
#
setParameter( string $name, mixed $parameter )
Sets a parameter value.
Parameters
- $name
string $name A parameter name
- $parameter
mixed $parameter The parameter value
Returns
mixed $this
|