Method | Description | |
---|---|---|
__construct ( SimpleSocket $socket, SimpleUrl $url, mixed $encoding ) | Constructor. Reads and parses the incoming content and headers. | |
getContent ( ) : string | Accessor for the content after the last header line. | |
getHeaders ( ) : SimpleHttpHeaders | Accessor for header block. The response is the combination of this and the content. | |
getMethod ( ) : string | Original request method. | |
getNewCookies ( ) : array | Accessor for any new cookies. | |
getRequestData ( ) : mixed | Original request data. | |
getSent ( ) : string | Raw request that was sent down the wire. | |
getUrl ( ) : SimpleUrl | Resource name. |
Method | Description | |
---|---|---|
isLastPacket ( string $packet ) : boolean | Test to see if the packet from the socket is the last one. | |
parse ( string $raw ) | Splits up the headers and the rest of the content. | |
readAll ( SimpleSocket $socket ) : string | Reads the whole of the socket output into a single string. |
public __construct ( SimpleSocket $socket, SimpleUrl $url, mixed $encoding ) | ||
$socket | SimpleSocket | Network connection to fetch response text from. |
$url | SimpleUrl | Resource name. |
$encoding | mixed | Record of content sent. |
public getContent ( ) : string | ||
return | string | All content. |
public getHeaders ( ) : SimpleHttpHeaders | ||
return | SimpleHttpHeaders | Wrapped header block. |
public getNewCookies ( ) : array | ||
return | array | List of new cookies. |
public getRequestData ( ) : mixed | ||
return | mixed | Sent content. |
protected isLastPacket ( string $packet ) : boolean | ||
$packet | string | Chunk to interpret. |
return | boolean | True if empty or EOF. |