$trustProxy
$trustProxy : boolean
Whether or not to trust HTTP_X headers set by most load balancers.
Only set to true if your application runs behind load balancers/proxies that you control.
A class that helps wrap Request information and particulars about a single request.
Provides methods commonly used to introspect on the request headers and request body.
$data : null|array|object
Array of POST data. Will contain form data as well as uploaded files.
In PUT/PATCH/DELETE requests this property will contain the form-urlencoded data.
None found |
None found |
None found |
None found |
None found |
None found |
None found |
$_detectors : array
The built in detectors used with `is()` can be modified with `addDetector()`.
There are several ways to specify a detector, see \Cake\Http\ServerRequest::addDetector() for the various formats and ways to define detectors.
None found |
$_detectorCache : array
Instance cache for results of is(something) calls
None found |
$stream : \Psr\Http\Message\StreamInterface
Request body stream. Contains php://input unless `input` constructor option is used.
None found |
$uri : \Psr\Http\Message\UriInterface
Uri instance
None found |
$session : \Cake\Http\Session
Instance of a Session object relative to this request
None found |
None found |
$emulatedAttributes : array
A list of propertes that emulated by the PSR7 attribute methods.
None found |
$uploadedFiles : array
Array of Psr\Http\Message\UploadedFileInterface objects.
None found |
None found |
$deprecatedProperties : array
List of deprecated properties that have backwards compatibility offered through magic methods.
None found |
createFromGlobals() : self
Wrapper method to create a new request from PHP superglobals.
Uses the $_GET, $_POST, $_FILES, $_COOKIE, $_SERVER, $_ENV and php://input data to construct the request.
None found |
__construct(string|array $config = array())
Create a new request object.
You can supply the data as either an array or as a string. If you use a string you can only supply the URL for the request. Using an array will let you provide the following keys:
post
POST data or non query string dataquery
Additional data from the query string.files
Uploaded file data formatted like $_FILES.cookies
Cookies for this request.environment
$_SERVER and $_ENV data.url
The URL without the base path for the request.uri
The PSR7 UriInterface object. If null, one will be created.base
The base URL for the request.webroot
The webroot directory for the request.input
The data that would come from php://input this is useful for simulating
requests with put, patch or delete data.session
An instance of a Session objectstring|array | $config | An array of request data to create a request with. The string version of this argument is deprecated and will be removed in 4.0.0 |
None found |
None found |
getSession() : \Cake\Http\Session
Returns the instance of the Session object for this request
None found |
session(\Cake\Http\Session|null $session = null) : \Cake\Http\Session
Returns the instance of the Session object for this request
If a session object is passed as first argument it will be set as the session to use for this request
\Cake\Http\Session|null | $session | the session object to use |
None found |
clientIp() : string
Get the IP the client is using, or says they are using.
The client IP.
None found |
setTrustedProxies(array $proxies) : void
register trusted proxies
array | $proxies | ips list of trusted proxies |
None found |
None found |
referer(boolean $local = false) : string
Returns the referer that referred this request.
boolean | $local | Attempt to return a local address. Local addresses do not contain hostnames. |
The referring address for this request.
None found |
__call(string $name, array $params) : mixed
Missing method handler, handles wrapping older style isAjax() type methods
string | $name | The method called |
array | $params | Array of parameters for the method call |
when an invalid method is called.
None found |
__set(string $name, mixed $value) : mixed
Magic set method allows backward compatibility for former public properties
string | $name | The property being accessed. |
mixed | $value | The property value. |
Either the value of the parameter or null.
None found |
__get(string $name) : mixed
Magic get method allows access to parsed routing parameters directly on the object.
Allows access to $this->params['controller']
via $this->controller
string | $name | The property being accessed. |
Either the value of the parameter or null.
None found |
__isset(string $name) : boolean
Magic isset method allows isset/empty checks on routing parameters.
string | $name | The property being accessed. |
Existence
None found |
is(string|array $type, array ...$args) : boolean
Check whether or not a Request is a certain type.
Uses the built in detection rules as well as additional rules
defined with Cake\Http\ServerRequest::addDetector(). Any detector can be called
as is($type)
or is$Type()
.
string|array | $type | The type of request you want to check. If an array this method will return true if the request matches any type. |
array | $args variadic | List of arguments |
Whether or not the request is the type you are checking.
None found |
clearDetectorCache() : void
Clears the instance detector cache, used by the is() function
None found |
isAll(array $types) : boolean
Check that a request matches all the given types.
Allows you to test multiple types and union the results. See Request::is() for how to add additional types and the built-in types.
array | $types | The types to check. |
Success.
None found |
addDetector(string $name, callable|array $callable) : void
Add a new detector to the list of detectors that a request can use.
There are several different formats and types of detectors that can be set.
Callback detectors allow you to provide a callable to handle the check. The callback will receive the request object as its only parameter.
addDetector('custom', function ($request) { //Return a boolean });
addDetector('custom', ['SomeClass', 'somemethod']);
An environment value comparison, compares a value fetched from env()
to a known value
the environment value is equality checked against the provided value.
e.g addDetector('post', ['env' => 'REQUEST_METHOD', 'value' => 'POST'])
Pattern value comparison allows you to compare a value fetched from env()
to a regular expression.
addDetector('iphone', ['env' => 'HTTP_USER_AGENT', 'pattern' => '/iPhone/i']);
Option based comparisons use a list of options to create a regular expression. Subsequent calls to add an already defined options detector will merge the options.
addDetector('mobile', ['env' => 'HTTP_USER_AGENT', 'options' => ['Fennec']]);
Allows for custom detectors on the request parameters.
e.g addDetector('requested', ['param' => 'requested', 'value' => 1]
You can also make parameter detectors that accept multiple values
using the options
key. This is useful when you want to check
if a request parameter is in a list of options.
addDetector('extension', ['param' => 'ext', 'options' => ['pdf', 'csv']]
string | $name | The name of the detector. |
callable|array | $callable | A callable or options array for the detector definition. |
None found |
addParams(array $params) : $this
Add parameters to the request's parsed parameter set. This will overwrite any existing parameters.
This modifies the parameters available through $request->getParam()
.
array | $params | Array of parameters to merge in |
The current object, you can chain this method.
None found |
addPaths(array $paths) : $this
Add paths to the requests' paths vars. This will overwrite any existing paths.
Provides an easy way to modify, here, webroot and base.
array | $paths | Array of paths to merge in |
The current object, you can chain this method.
None found |
here(boolean $base = true) : string
Get the value of the current requests URL. Will include the query string arguments.
boolean | $base | Include the base path, set to false to trim the base path off. |
The current request URL including query string args.
None found |
header(string $name) : string|null
Read an HTTP header from the Request information.
If the header is not defined in the request, this method will fallback to reading data from $_SERVER and $_ENV. This fallback behavior is deprecated, and will be removed in 4.0.0
string | $name | Name of the header you want. |
Either null on no header being set or the value of the header.
None found |
getHeaders() : array
Get all headers in the request.
Returns an associative array where the header names are the keys and the values are a list of header values.
While header names are not case-sensitive, getHeaders() will normalize the headers.
An associative array of headers and their values.
None found |
hasHeader(string $name) : boolean
Check if a header is set in the request.
string | $name | The header you want to get (case-insensitive) |
Whether or not the header is defined.
None found |
getHeader(string $name) : array
Get a single header from the request.
Return the header value as an array. If the header is not present an empty array will be returned.
string | $name | The header you want to get (case-insensitive) |
An associative array of headers and their values. If the header doesn't exist, an empty array will be returned.
None found |
getHeaderLine(string $name) : string
Get a single header as a string from the request.
string | $name | The header you want to get (case-insensitive) |
Header values collapsed into a comma separated string.
None found |
withHeader(string $name, string|array $value) : static
Get a modified request with the provided header.
string | $name | The header name. |
string|array | $value | The header value |
None found |
withAddedHeader(string $name, string|array $value) : static
Get a modified request with the provided header.
Existing header values will be retained. The provided value will be appended into the existing values.
string | $name | The header name. |
string|array | $value | The header value |
None found |
withoutHeader(string $name) : static
Get a modified request without a provided header.
string | $name | The header name to remove. |
None found |
method() : string
Get the HTTP method used for this request.
The name of the HTTP method used.
None found |
getMethod() : string
Get the HTTP method used for this request.
There are a few ways to specify a method.
_method
Any of these 3 approaches can be used to set the HTTP method used by CakePHP internally, and will effect the result of this method.
The name of the HTTP method used.
None found |
withMethod(string $method) : static
Update the request method and get a new instance.
string | $method | The HTTP method to use. |
A new instance with the updated method.
None found |
getServerParams() : array
Get all the server environment parameters.
Read all of the 'environment' or 'server' data that was used to create this request.
None found |
getQueryParams() : array
Get all the query parameters in accordance to the PSR-7 specifications. To read specific query values use the alternative getQuery() method.
Retrieves the deserialized query string arguments, if any.
Note: the query params might not be in sync with the URI or server
params. If you need to ensure you are only getting the original
values, you may need to parse the query string from getUri()->getQuery()
or from the QUERY_STRING
server param.
None found |
withQueryParams(array $query) : static
Update the query string data and get a new instance.
These values SHOULD remain immutable over the course of the incoming request. They MAY be injected during instantiation, such as from PHP's $_GET superglobal, or MAY be derived from some other value such as the URI. In cases where the arguments are parsed from the URI, the data MUST be compatible with what PHP's parse_str() would return for purposes of how duplicate query parameters are handled, and how nested sets are handled.
Setting query string arguments MUST NOT change the URI stored by the request, nor the values in the server params.
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated query string arguments.
array | $query | The query string data to use |
A new instance with the updated query string data.
None found |
None found |
None found |
scheme() : string
Get the current url scheme used for the request.
e.g. 'http', or 'https'
The scheme used for the request.
None found |
domain(integer $tldLength = 1) : string
Get the domain name and include $tldLength segments of the tld.
integer | $tldLength | Number of segments your tld contains. For example: |
Domain name without subdomains.
None found |
subdomains(integer $tldLength = 1) : array
Get the subdomains for a host.
integer | $tldLength | Number of segments your tld contains. For example: |
An array of subdomains.
None found |
accepts(string|null $type = null) : array|boolean
Find out which content types the client accepts or check if they accept a particular type of content.
$this->request->accepts();
$this->request->accepts('application/json');
This method will order the returned content types by the preference values indicated by the client.
string|null | $type | The content type to check for. Leave null to get all types a client accepts. |
Either an array of all the types the client accepts or a boolean if they accept the provided type.
None found |
parseAccept() : array
Parse the HTTP_ACCEPT header and return a sorted array with content types as the keys, and pref values as the values.
Generally you want to use Cake\Http\ServerRequest::accept() to get a simple list of the accepted content types.
An array of prefValue => [content/types]
None found |
acceptLanguage(string|null $language = null) : array|boolean
Get the languages accepted by the client, or check if a specific language is accepted.
Get the list of accepted languages:
\Cake\Http\ServerRequest::acceptLanguage();
Check if a specific language is accepted:
\Cake\Http\ServerRequest::acceptLanguage('es-es');
string|null | $language | The language to test. |
If a $language is provided, a boolean. Otherwise the array of accepted languages.
None found |
query(string|null $name = null) : string|array|null
Provides a read accessor for `$this->query`.
Allows you to use a Hash::get()
compatible syntax for reading post data.
string|null | $name | Query string variable name or null to read all. |
The value being read
None found |
getQuery(string|null $name = null, mixed $default = null) : null|string|array
Read a specific query value or dotted path.
Developers are encouraged to use getQueryParams() when possible as it is PSR-7 compliant, and this method is not.
$value = Hash::get($request->getQueryParams(), 'Post.id', null);
string|null | $name | The name or dotted path to the query param or null to read all. |
mixed | $default | The default value if the named parameter is not set, and $name is not null. |
Query data.
None found |
data(string|null $name = null, mixed ...$args) : mixed|$this
Provides a read/write accessor for `$this->data`.
Allows you to use a Hash::get()
compatible syntax for reading post data.
$request->data('Post.title');
When reading values you will get null
for keys/values that do not exist.
$request->data('Post.title', 'New post!');
You can write to any value, even paths/keys that do not exist, and the arrays will be created for you.
string|null | $name | Dot separated name of the value to read/write |
mixed | $args variadic | The data to set (deprecated) |
Either the value being read, or this so you can chain consecutive writes.
None found |
getData(string|null $name = null, mixed $default = null) : null|string|array
Provides a safe accessor for request data. Allows you to use Hash::get() compatible paths.
// get all data
$request->getData();
// Read a specific field.
$request->getData('Post.title');
// With a default value.
$request->getData('Post.not there', 'default value');
When reading values you will get null
for keys/values that do not exist.
string|null | $name | Dot separated name of the value to read. Or null to read all data. |
mixed | $default | The default data. |
The value being read.
None found |
param(string $name, mixed ...$args) : mixed|$this
Safely access the values in $this->params.
string | $name | The name of the parameter to get. |
mixed | $args variadic | Value to set (deprecated). |
The value of the provided parameter. Will return false if the parameter doesn't exist or is falsey.
None found |
input(string|null $callback = null, array ...$args) : string
Read data from `php://input`. Useful when interacting with XML or JSON request body content.
Getting input with a decoding function:
$this->request->input('json_decode');
Getting input using a decoding function, and additional params:
$this->request->input('Xml::build', ['return' => 'DOMDocument']);
Any additional parameters are applied to the callback in the order they are given.
string|null | $callback | A decoding callback that will convert the string data to another representation. Leave empty to access the raw input data. You can also supply additional parameters for the decoding callback using var args, see above. |
array | $args variadic | The additional arguments |
The decoded/processed request data.
None found |
cookie(string $key) : null|string
Read cookie data from the request's cookie data.
string | $key | The key you want to read. |
Either the cookie value, or null if the value doesn't exist.
None found |
getCookie(string $key, string $default = null) : null|array|string
Read cookie data from the request's cookie data.
string | $key | The key or dotted path you want to read. |
string | $default | The default value if the cookie is not set. |
Either the cookie value, or null if the value doesn't exist.
None found |
getCookieCollection() : \Cake\Http\Cookie\CookieCollection
Get a cookie collection based on the request's cookies
The CookieCollection lets you interact with request cookies using
\Cake\Http\Cookie\Cookie
objects and can make converting request cookies
into response cookies easier.
This method will create a new cookie collection each time it is called.
This is an optimization that allows fewer objects to be allocated until
the more complex CookieCollection is needed. In general you should prefer
getCookie()
and getCookieParams()
over this method. Using a CookieCollection
is ideal if your cookies contain complex JSON encoded data.
None found |
withCookieCollection(\Cake\Http\Cookie\CookieCollection $cookies) : static
Replace the cookies in the request with those contained in the provided CookieCollection.
\Cake\Http\Cookie\CookieCollection | $cookies | The cookie collection |
None found |
getCookieParams() : array
Get all the cookie data from the request.
Retrieves cookies sent by the client to the server.
The data MUST be compatible with the structure of the $_COOKIE superglobal.
An array of cookie data.
None found |
withCookieParams(array $cookies) : static
Replace the cookies and get a new request instance.
The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST be compatible with the structure of $_COOKIE. Typically, this data will be injected at instantiation.
This method MUST NOT update the related Cookie header of the request instance, nor related values in the server params.
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated cookie values.
array | $cookies | The new cookie data to use. |
None found |
getParsedBody() : null|array|object
Get the parsed request body data.
If the request Content-Type is either application/x-www-form-urlencoded or multipart/form-data, and the request method is POST, this will be the post data. For other content types, it may be the deserialized request body.
The deserialized body parameters, if any. These will typically be an array or object.
None found |
withParsedBody(null|array|object $data) : static
Update the parsed body and get a new instance.
These MAY be injected during instantiation.
If the request Content-Type is either application/x-www-form-urlencoded or multipart/form-data, and the request method is POST, use this method ONLY to inject the contents of $_POST.
The data IS NOT REQUIRED to come from $_POST, but MUST be the results of deserializing the request body content. Deserialization/parsing returns structured data, and, as such, this method ONLY accepts arrays or objects, or a null value if nothing was available to parse.
As an example, if content negotiation determines that the request data is a JSON payload, this method could be used to create a request instance with the deserialized parameters.
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated body parameters.
null|array|object | $data | The deserialized body data. This will typically be in an array or object. |
None found |
getProtocolVersion() : string
Retrieves the HTTP protocol version as a string.
HTTP protocol version.
None found |
withProtocolVersion(string $version) : static
Return an instance with the specified HTTP protocol version.
The version string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
string | $version | HTTP protocol version |
None found |
getEnv(string $key, string|null $default = null) : string|null
Get a value from the request's environment data.
Fallback to using env() if the key is not set in the $environment property.
string | $key | The key you want to read from. |
string|null | $default | Default value when trying to retrieve an environment variable's value that does not exist. |
Either the environment value, or null if the value doesn't exist.
None found |
withEnv(string $key, string $value) : static
Update the request with a new environment data element.
Returns an updated request object. This method returns a new request object and does not mutate the request in-place.
string | $key | The key you want to write to. |
string | $value | Value to set |
None found |
env(string $key, string|null $value = null, string|null $default = null) : $this|string|null
Get/Set value from the request's environment data.
Fallback to using env() if key not set in $environment property.
string | $key | The key you want to read/write from/to. |
string|null | $value | Value to set. Default null. |
string|null | $default | Default value when trying to retrieve an environment variable's value that does not exist. The value parameter must be null. |
This instance if used as setter, if used as getter either the environment value, or null if the value doesn't exist.
None found |
allowMethod(string|array $methods) : boolean
Allow only certain HTTP request methods, if the request method does not match a 405 error will be shown and the required "Allow" response header will be set.
Example:
$this->request->allowMethod('post'); or $this->request->allowMethod(['post', 'delete']);
If the request would be GET, response header "Allow: POST, DELETE" will be set and a 405 error will be returned.
string|array | $methods | Allowed HTTP request methods. |
true
None found |
setInput(string $input) : void
Modify data originally from `php://input`. Useful for altering json/xml data in middleware or DispatcherFilters before it gets to RequestHandlerComponent
string | $input | A string to replace original parsed data from input() |
None found |
withData(string $name, mixed $value) : static
Update the request with a new request data element.
Returns an updated request object. This method returns a new request object and does not mutate the request in-place.
Use withParsedBody()
if you need to replace the all request data.
string | $name | The dot separated path to insert $value at. |
mixed | $value | The value to insert into the request data. |
None found |
withoutData(string $name) : static
Update the request removing a data element.
Returns an updated request object. This method returns a new request object and does not mutate the request in-place.
string | $name | The dot separated path to remove. |
None found |
withParam(string $name, mixed $value) : static
Update the request with a new routing parameter
Returns an updated request object. This method returns a new request object and does not mutate the request in-place.
string | $name | The dot separated path to insert $value at. |
mixed | $value | The value to insert into the the request parameters. |
None found |
getParam(string $name, mixed $default = false) : mixed
Safely access the values in $this->params.
string | $name | The name or dotted path to parameter. |
mixed | $default | The default value if |
None found |
withAttribute(string $name, mixed $value) : static
Return an instance with the specified request attribute.
This method allows setting a single derived request attribute as described in getAttributes().
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated attribute.
string | $name | The attribute name. |
mixed | $value | The value of the attribute. |
None found |
withoutAttribute(string $name) : static
Return an instance without the specified request attribute.
This method allows removing a single derived request attribute as described in getAttributes().
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that removes the attribute.
string | $name | The attribute name. |
None found |
getAttribute(string $name, mixed|null $default = null) : mixed
Read an attribute from the request, or get the default
Retrieves a single derived request attribute as described in getAttributes(). If the attribute has not been previously set, returns the default value as provided.
This method obviates the need for a hasAttribute() method, as it allows specifying a default value to return if the attribute is not found.
string | $name | The attribute name. |
mixed|null | $default | The default value if the attribute has not been set. |
None found |
getAttributes() : array
Get all the attributes in the request.
This will include the params, webroot, base, and here attributes that CakePHP provides.
None found |
getUploadedFile(string $path) : null|\Psr\Http\Message\UploadedFileInterface
Get the uploaded file from a dotted path.
string | $path | The dot separated path to the file you want. |
None found |
getUploadedFiles() : array
Get the array of uploaded files from the request.
This method returns upload metadata in a normalized tree, with each leaf an instance of Psr\Http\Message\UploadedFileInterface.
These values MAY be prepared from $_FILES or the message body during instantiation, or MAY be injected via withUploadedFiles().
None found |
withUploadedFiles(array $files) : static
Update the request replacing the files, and creating a new instance.
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated body parameters.
array | $files | An array of uploaded file objects. |
when $files contains an invalid object.
None found |
getBody() : \Psr\Http\Message\StreamInterface
Gets the body of the message.
Returns the body as a stream.
None found |
withBody(\Psr\Http\Message\StreamInterface $body) : static
Return an instance with the specified message body.
\Psr\Http\Message\StreamInterface | $body | The new request body |
None found |
getUri() : \Psr\Http\Message\UriInterface
Retrieves the URI instance.
Returns a UriInterface instance representing the URI of the request.
None found |
withUri(\Psr\Http\Message\UriInterface $uri, boolean $preserveHost = false) : static
Return an instance with the specified uri
Warning Replacing the Uri will not update the base
, webroot
,
and url
attributes.
\Psr\Http\Message\UriInterface | $uri | The new request uri |
boolean | $preserveHost | Whether or not the host should be retained. |
None found |
withRequestTarget(string $target) : static
Create a new instance with a specific request-target.
You can use this method to overwrite the request target that is inferred from the request's Uri. This also lets you change the request target's form to an absolute-form, authority-form or asterisk-form
string | $target | The request target. |
None found |
getRequestTarget() : string
Retrieves the request's target.
Retrieves the message's request-target either as it was requested,
or as set with withRequestTarget()
. By default this will return the
application relative path without base directory, and the query string
defined in the SERVER environment.
None found |
since | 3.6.1 |
---|
offsetGet(string $name) : mixed
Array access read implementation
string | $name | Name of the key being accessed. |
None found |
offsetSet(string $name, mixed $value) : void
Array access write implementation
string | $name | Name of the key being written |
mixed | $value | The value being written. |
None found |
offsetExists(string $name) : boolean
Array access isset() implementation
string | $name | thing to check. |
None found |
offsetUnset(string $name) : void
Array access unset() implementation
string | $name | Name to unset. |
None found |
_setConfig(array $config) : void
Process the config/settings data into properties.
array | $config | The config data to use. |
None found |
_processPost(array $data) : array
Sets the REQUEST_METHOD environment variable based on the simulated _method HTTP override value. The 'ORIGINAL_REQUEST_METHOD' is also preserved, if you want the read the non-simulated HTTP method the client used.
array | $data | Array of post data. |
None found |
_processGet(array $query, string $queryString = '') : array
Process the GET parameters and move things into the object.
array | $query | The array to which the parsed keys/values are being added. |
string | $queryString | A query string from the URL if provided |
An array containing the parsed query string as keys/values.
None found |
_processFiles(array $post, array $files) : array
Process uploaded files and move things onto the post data.
array | $post | Post data to merge files onto. |
array | $files | Uploaded files to merge in. |
merged post + file data.
None found |
_createUploadedFile(array $value) : array|\Psr\Http\Message\UploadedFileInterface
Create an UploadedFile instance from a $_FILES array.
If the value represents an array of values, this method will recursively process the data.
array | $value | $_FILES struct |
None found |
_normalizeNestedFiles(array $files = array()) : array
Normalize an array of file specifications.
Loops through all nested files and returns a normalized array of UploadedFileInterface instances.
array | $files | The file data to normalize & convert. |
An array of UploadedFileInterface objects.
None found |
_is(string $type, array $args) : boolean
Worker for the public is() function
string | $type | The type of request you want to check. |
array | $args | Array of custom detector arguments. |
Whether or not the request is the type you are checking.
None found |
_acceptHeaderDetector(array $detect) : boolean
Detects if a specific accept header is present.
array | $detect | Detector options array. |
Whether or not the request is the type you are checking.
None found |
_headerDetector(array $detect) : boolean
Detects if a specific header is present.
array | $detect | Detector options array. |
Whether or not the request is the type you are checking.
None found |
_paramDetector(array $detect) : boolean
Detects if a specific request parameter is present.
array | $detect | Detector options array. |
Whether or not the request is the type you are checking.
None found |
_environmentDetector(array $detect) : boolean
Detects if a specific environment variable is present.
array | $detect | Detector options array. |
Whether or not the request is the type you are checking.
None found |
normalizeHeaderName(string $name) : string
Normalize a header name into the SERVER version.
string | $name | The header name. |
The normalized header name.
None found |
_parseAcceptWithQualifier(string $header) : array
Parse Accept* headers with qualifier options.
Only qualifiers will be extracted, any other accept extensions will be discarded as they are not frequently used.
string | $header | Header to parse. |
None found |
_readInput() : string
Read data from php://input, mocked in tests.
contents of php://input
None found |
validateUploadedFiles(array $uploadedFiles, string $path) : void
Recursively validate uploaded file data.
array | $uploadedFiles | The new files array to validate. |
string | $path | The path thus far. |
If any leaf elements are not valid files.
None found |