Property | Type | Description | |
---|---|---|---|
$client | owner client instance. |
Method | Description | |
---|---|---|
__toString ( ) : string | PHP magic method that returns the string representation of this object. | |
addCookies ( array $cookies ) | Adds more cookies to the already defined ones. | |
addData ( array $data ) | Adds data fields to the existing ones. | |
addHeaders ( array $headers ) | Adds more headers to the already defined ones. | |
composeHeaderLines ( ) : array | Composes raw header lines from [[headers]]. | |
getContent ( ) : string | Returns HTTP message raw content. | |
getCookies ( ) : |
Returns the cookie collection. | |
getData ( ) : mixed | Returns the data fields, parsed from raw content. | |
getFormat ( ) : string | Returns body format. | |
getHeaders ( ) : |
Returns the header collection. | |
hasCookies ( ) : boolean | Checks of HTTP message contains any cookie. | |
hasHeaders ( ) : boolean | Checks of HTTP message contains any header. | |
setContent ( string $content ) | Sets the HTTP message raw content. | |
setCookies ( |
Sets the cookies associated with HTTP message. | |
setData ( mixed $data ) | Sets the data fields, which composes message content. | |
setFormat ( string $format ) | Sets body format. | |
setHeaders ( array | |
Sets the HTTP headers associated with HTTP message. | |
toString ( ) : string | Returns string representation of this HTTP message. |
Method | Description | |
---|---|---|
defaultFormat ( ) : string | Returns default format name. |
public __toString ( ) : string | ||
return | string | the string representation of this object. |
public addCookies ( array $cookies ) | ||
$cookies | array | additional cookies. |
public addHeaders ( array $headers ) | ||
$headers | array | additional headers in format: [headerName => headerValue] |
public composeHeaderLines ( ) : array | ||
return | array | raw header lines. |
protected defaultFormat ( ) : string | ||
return | string | default format name. |
public getContent ( ) : string | ||
return | string | raw body. |
public getCookies ( ) : |
||
return | the cookie collection. |
public getHeaders ( ) : |
||
return | the header collection |
public hasCookies ( ) : boolean | ||
return | boolean | whether message contains any cookie. |
public hasHeaders ( ) : boolean | ||
return | boolean | whether message contains any header. |
public setContent ( string $content ) | ||
$content | string | raw content. |
public setCookies ( |
||
$cookies | cookie collection or cookies list. |
public setHeaders ( array | |
||
$headers | array | |
headers collection or headers list in format: [headerName => headerValue] |