Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../vendor/psr/http-mes.../src
File: ResponseInterface.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Psr\Http\Message;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Representation of an outgoing, server-side response.
[5] Fix | Delete
*
[6] Fix | Delete
* Per the HTTP specification, this interface includes properties for
[7] Fix | Delete
* each of the following:
[8] Fix | Delete
*
[9] Fix | Delete
* - Protocol version
[10] Fix | Delete
* - Status code and reason phrase
[11] Fix | Delete
* - Headers
[12] Fix | Delete
* - Message body
[13] Fix | Delete
*
[14] Fix | Delete
* Responses are considered immutable; all methods that might change state MUST
[15] Fix | Delete
* be implemented such that they retain the internal state of the current
[16] Fix | Delete
* message and return an instance that contains the changed state.
[17] Fix | Delete
*/
[18] Fix | Delete
interface ResponseInterface extends MessageInterface
[19] Fix | Delete
{
[20] Fix | Delete
/**
[21] Fix | Delete
* Gets the response status code.
[22] Fix | Delete
*
[23] Fix | Delete
* The status code is a 3-digit integer result code of the server's attempt
[24] Fix | Delete
* to understand and satisfy the request.
[25] Fix | Delete
*
[26] Fix | Delete
* @return int Status code.
[27] Fix | Delete
*/
[28] Fix | Delete
public function getStatusCode();
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Return an instance with the specified status code and, optionally, reason phrase.
[32] Fix | Delete
*
[33] Fix | Delete
* If no reason phrase is specified, implementations MAY choose to default
[34] Fix | Delete
* to the RFC 7231 or IANA recommended reason phrase for the response's
[35] Fix | Delete
* status code.
[36] Fix | Delete
*
[37] Fix | Delete
* This method MUST be implemented in such a way as to retain the
[38] Fix | Delete
* immutability of the message, and MUST return an instance that has the
[39] Fix | Delete
* updated status and reason phrase.
[40] Fix | Delete
*
[41] Fix | Delete
* @link http://tools.ietf.org/html/rfc7231#section-6
[42] Fix | Delete
* @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
[43] Fix | Delete
* @param int $code The 3-digit integer result code to set.
[44] Fix | Delete
* @param string $reasonPhrase The reason phrase to use with the
[45] Fix | Delete
* provided status code; if none is provided, implementations MAY
[46] Fix | Delete
* use the defaults as suggested in the HTTP specification.
[47] Fix | Delete
* @return static
[48] Fix | Delete
* @throws \InvalidArgumentException For invalid status code arguments.
[49] Fix | Delete
*/
[50] Fix | Delete
public function withStatus($code, $reasonPhrase = '');
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Gets the response reason phrase associated with the status code.
[54] Fix | Delete
*
[55] Fix | Delete
* Because a reason phrase is not a required element in a response
[56] Fix | Delete
* status line, the reason phrase value MAY be null. Implementations MAY
[57] Fix | Delete
* choose to return the default RFC 7231 recommended reason phrase (or those
[58] Fix | Delete
* listed in the IANA HTTP Status Code Registry) for the response's
[59] Fix | Delete
* status code.
[60] Fix | Delete
*
[61] Fix | Delete
* @link http://tools.ietf.org/html/rfc7231#section-6
[62] Fix | Delete
* @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
[63] Fix | Delete
* @return string Reason phrase; must return an empty string if none present.
[64] Fix | Delete
*/
[65] Fix | Delete
public function getReasonPhrase();
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function