Holds information about the current request.
This class implements a fluent interface.
| Methods | ||
|---|---|---|
public
|
__construct(
string $baseUrl = '',
string $method = 'GET',
string $host = 'localhost',
string $scheme = 'http',
int $httpPort = 80,
int $httpsPort = 443,
string $path = '/',
string $queryString = '',
)
|
# |
public
static
|
fromUri(
string $uri,
string $host = 'localhost',
string $scheme = 'http',
int $httpPort = 80,
int $httpsPort = 443,
): self
|
# |
public
|
fromRequest(Request $request): $this
|
# |
public
|
getBaseUrl(): string
|
# |
public
|
setBaseUrl(string $baseUrl): $this
|
# |
public
|
getPathInfo(): string
|
# |
public
|
setPathInfo(string $pathInfo): $this
|
# |
public
|
getMethod(): string
|
# |
public
|
setMethod(string $method): $this
|
# |
public
|
getHost(): string
|
# |
public
|
setHost(string $host): $this
|
# |
public
|
getScheme(): string
|
# |
public
|
setScheme(string $scheme): $this
|
# |
public
|
getHttpPort(): int
|
# |
public
|
setHttpPort(int $httpPort): $this
|
# |
public
|
getHttpsPort(): int
|
# |
public
|
setHttpsPort(int $httpsPort): $this
|
# |
public
|
getQueryString(): string
|
# |
public
|
setQueryString(?string $queryString): $this
|
# |
public
|
getParameters(): array
|
# |
public
|
setParameters(array $parameters): $this
|
# |
public
|
getParameter(string $name): mixed
|
# |
public
|
hasParameter(string $name): bool
|
# |
public
|
setParameter(string $name, mixed $parameter): $this
|
# |
public
|
isSecure(): bool
|
# |
| Properties | |||
|---|---|---|---|
private
|
string
|
$baseUrl
|
# |
private
|
string
|
$pathInfo
|
# |
private
|
string
|
$method
|
# |
private
|
string
|
$host
|
# |
private
|
string
|
$scheme
|
# |
private
|
int
|
$httpPort
|
# |
private
|
int
|
$httpsPort
|
# |
private
|
string
|
$queryString
|
# |
private
|
array
|
$parameters = []
|
# |