| Methods |
public
|
__construct(array<string, mixed> $params = null, array<string, string> $headers = null)
Parameters
| $params |
the request parameters
|
| $headers |
the HTTP request headers
|
Overrides
|
#
|
public
|
isImmediate(): bool
Returns whether the request requires that no user
interaction is to be made.
Returns whether the request requires that no user
interaction is to be made.
Returns
true if no user interaction is to be made
|
#
|
public
|
setImmediate(bool $immediate): void
Sets whether the request requires that no user
interaction is to be made.
Sets whether the request requires that no user
interaction is to be made.
Parameters
| $immediate |
true if no user interaction is to be made
|
|
#
|
public
|
getHeader(string $header): string
Returns the value of a specified header
Returns the value of a specified header
Parameters
| $header |
the header to return
|
Returns
|
#
|
public
|
hasHeader(string $header): bool
Returns whether a specified header exists
Returns whether a specified header exists
Parameters
Returns
true if the header exists
|
#
|
public
|
getAuthorizationHeader(bool $parse_credentials = false): array<string, string>|null
Parses and returns the request's Authorization header.
Parses and returns the request's Authorization header.
This method extracts the request's Authorization header and returns an
array with the following elements:
-
#scheme - the authentication scheme, e.g. Basic, Bearer
-
#credentials - the credentials following the scheme
If $parse_credentials is true, the method will also attempt to parse
the credential information. For the Basic scheme, the user name and
password will be returned in the array as #username and #password
respectively. For other schemes with delimited name-value parameters,
those name-value pairs will be returned.
Parameters
| $parse_credentials |
whether to parse the credential information
|
Returns
the parsed Authorization header, or null if none
exists
|
#
|
public
|
paramToArray(string $param, string $delimiter = '/\s+/'): array<string>|null
Converts a parameter consisting of space-delimited values
into an array of values.
Converts a parameter consisting of space-delimited values
into an array of values.
Parameters
| $param |
the parameter name to check
|
| $delimiter |
a regular expression to determine
the delimiter between values
|
Returns
an array of values, or null if the parameter
is not found
|
#
|
public
|
paramContains(string $param, string $contains, string $delimiter = '/\s+/'): bool
Returns whether a parameter consisting of space-delimited values
contains a specified value.
Returns whether a parameter consisting of space-delimited values
contains a specified value.
Parameters
| $param |
the parameter name to check
|
| $contains |
the value
|
| $delimiter |
a regular expression to determine
the delimiter between values
|
Returns
true if the parameter contains the value, or null if the parameter
is not found
|
#
|
public
|
paramRemove(string $param, string $value, string $delimiter = '/\s+/'): void
Remove a specified value from a parameter consisting of space-delimited
values
Remove a specified value from a parameter consisting of space-delimited
values
Parameters
| $param |
the parameter name to check
|
| $value |
the value to remove
|
| $delimiter |
a regular expression to determine
the delimiter between values
|
|
#
|