Свойство | Тип | Описание | |
---|---|---|---|
$charset | string | ||
$content | string | Entity body of this message | |
$headers | |||
$version | string | The HTTP version value of this message, for example "HTTP/1.1" |
Метод | Описание | |
---|---|---|
__construct ( ) | ||
getCharset ( ) : string | Returns the character set of this response. | |
getContent ( ) : string | Returns the content of the message body | |
getCookie ( string $name ) : |
Returns a cookie specified by the given name | |
getCookies ( ) : array | Returns all cookies attached to the headers of this message | |
getHeader ( string $name ) : array | string | Returns the value(s) of the specified header | |
getHeaders ( ) : |
Returns the HTTP headers of this request | |
getStartLine ( ) : string | Returns the first line of this message, which is the Request's Request-Line or the Response's Status-Line. | |
getVersion ( ) : string | Returns the HTTP version value of this message, for example "HTTP/1.1" | |
hasCookie ( string $name ) : boolean | Checks if the specified cookie exists | |
hasHeader ( string $name ) : boolean | Checks if the specified header exists. | |
removeCookie ( string $name ) : void | Removes the specified cookie from the headers of this message, if it exists | |
setCharset ( string $charset ) : self | Sets the character set for this message. | |
setContent ( string $content ) : self | Explicitly sets the content of the message body | |
setCookie ( |
Sets the given cookie to in the headers of this message. | |
setHeader ( string $name, array | string | DateTime $values, boolean $replaceExistingHeader = true ) : self | Sets the specified HTTP header | |
setVersion ( string $version ) : void | Sets the HTTP version value of this message, for example "HTTP/1.1" |
public getCharset ( ) : string | ||
Результат | string | An IANA character set identifier |
public getContent ( ) : string | ||
Результат | string | The response content |
public getCookies ( ) : array | ||
Результат | array | An array of Cookie objects |
public getHeaders ( ) : |
||
Результат |
abstract public getStartLine ( ) : string | ||
Результат | string | The first line of the message |
public getVersion ( ) : string | ||
Результат | string |
public removeCookie ( string $name ) : void | ||
$name | string | Name of the cookie to remove |
Результат | void |
public setCharset ( string $charset ) : self | ||
$charset | string | A valid IANA character set identifier |
Результат | self | This message, for method chaining |
public setContent ( string $content ) : self | ||
$content | string | The body content |
Результат | self | This message, for method chaining |
public setHeader ( string $name, array | string | DateTime $values, boolean $replaceExistingHeader = true ) : self | ||
$name | string | Name of the header, for example "Location", "Content-Description" etc. |
$values | array | string | DateTime | An array of values or a single value for the specified header field |
$replaceExistingHeader | boolean | If a header with the same name should be replaced. Default is TRUE. |
Результат | self | This message, for method chaining |
public setVersion ( string $version ) : void | ||
$version | string | |
Результат | void |
protected string $version | ||
Результат | string |