FormRequest
class FormRequest extends Request implements RequestInterface
Class FormRequest
Methods
Returns the value of a header.
Returns the value of a particular header attribute.
Merges cookie headers on the way out.
Sets the content of the message.
No description
FormRequest constructor.
Returns the resource portion of the request line.
Sets the value of a form field.
No description
No description
No description
Details
in AbstractMessage at line 22
string|array|null
getHeader(string $name, string|boolean $glue = "\r\n")
Returns the value of a header.
in AbstractMessage at line 47
array
getHeaderAttributes(string $name)
Returns a header's attributes.
in AbstractMessage at line 74
string|null
getHeaderAttribute(string $header, string $attribute)
Returns the value of a particular header attribute.
in AbstractMessage at line 88
DOMDocument
toDomDocument()
Returns the current message as a DOMDocument.
in Request at line 33
setHeaders(array $headers)
Sets all headers on the current message.
Headers can be complete ["Header: value"] pairs or an associative array ["Header" => "value"]
in Request at line 42
addHeader(string $header)
Adds a header to this message.
in AbstractMessage at line 114
addHeaders(array $headers)
Adds a set of headers to this message.
Headers can be complete ["Header: value"] pairs or an associative array ["Header" => "value"]
at line 87
array
getHeaders()
Merges cookie headers on the way out.
at line 82
setContent(string $content)
Sets the content of the message.
at line 107
string
getContent()
in Request at line 142
string
__toString()
Returns a string representation of the current request.
in AbstractMessage at line 145
protected
flattenHeaders(array $headers)
at line 21
__construct(string $method = self::METHOD_POST, string $resource = '/', string $host = null)
FormRequest constructor.
in Request at line 55
setMethod(string $method)
Sets the HTTP method of the current request.
in Request at line 60
string
getMethod()
Returns the HTTP method of the current request.
in Request at line 65
setResource(string $resource)
Sets the resource for the current request.
at line 67
string
getResource()
Returns the resource portion of the request line.
in Request at line 75
setHost(string $host)
Sets the host for the current request.
in Request at line 80
string|null
getHost()
Returns the value of the host header.
in Request at line 85
setProtocolVersion($protocolVersion)
in Request at line 90
float
getProtocolVersion()
Returns the protocol version of the current request.
in Request at line 100
string
getUrl()
A convenience method for getting the full URL of the current request.
in Request at line 110
fromUrl(Url|string $url)
A convenience method for populating the current request from a URL.
in Request at line 124
Boolean
isSecure()
Returns true if the current request is secure.
at line 34
setField($name, $value)
Sets the value of a form field.
If the value is an array it will be flattened and one field value will be added for each leaf.