Skip to content

SimplePie_HTTP_Parser

HTTP Response Parser

  • Full name: \SimplePie_HTTP_Parser
  • Parent class: \SimplePie\HTTP\Parser
  • Warning: this class is deprecated. This means that this class will likely be removed in a future version.

Inherited methods

__construct

Create an instance of the class with the input data

public __construct(string $data): mixed

Parameters:

Parameter Type Description
$data string Input data

parse

Parse the input data

public parse(): bool

Return Value:

true on success, false on failure


has_data

Check whether there is data beyond the pointer

protected has_data(): bool

Return Value:

true if there is further data, false if not


is_linear_whitespace

See if the next character is LWS

protected is_linear_whitespace(): bool

Return Value:

true if the next character is LWS, false if not


http_version

Parse the HTTP version

protected http_version(): mixed

status

Parse the status code

protected status(): mixed

reason

Parse the reason phrase

protected reason(): mixed

new_line

Deal with a new line, shifting data around as needed

protected new_line(): mixed

name

Parse a header name

protected name(): mixed

linear_whitespace

Parse LWS, replacing consecutive LWS characters with a single space

protected linear_whitespace(): mixed

value

See what state to move to while within non-quoted header values

protected value(): mixed

value_char

Parse a header value while outside quotes

protected value_char(): mixed

quote

See what state to move to while within quoted header values

protected quote(): mixed

quote_char

Parse a header value while within quotes

protected quote_char(): mixed

quote_escaped

Parse an escaped character within quotes

protected quote_escaped(): mixed

body

Parse the body

protected body(): mixed

chunked

Parsed a "Transfer-Encoding: chunked" body

protected chunked(): mixed

prepareHeaders

Prepare headers (take care of proxies headers)

public static prepareHeaders(string $headers, int $count = 1): string
  • This method is static.

Parameters:

Parameter Type Description
$headers string Raw headers
$count int Redirection count. Default to 1.


Automatically generated on 2025-03-18