class SimplePie_HTTP_Parser


Located at : UKNOWVA_ROOT/libraries/simplepie/simplepie.php

HTTP Response Parser

Properties

float $http_version HTTP Version
int $status_code Status code
string $reason Reason phrase
array $headers Key/value pairs of the headers
string $body Body of the response
string $state Current state of the state machine
string $data Input data
int $data_length Input data length (to avoid calling strlen() everytime this is needed)
int $position Current position of the pointer
string $name Name of the hedaer currently being parsed
string $value Value of the hedaer currently being parsed

Methods

SimplePie_HTTP_Parser(string $data)

Create an instance of the class with the input data

bool
parse()

Parse the input data

bool
has_data()

Check whether there is data beyond the pointer

bool
is_linear_whitespace()

See if the next character is LWS

http_version()

Parse the HTTP version

status()

Parse the status code

reason()

Parse the reason phrase

new_line()

Deal with a new line, shifting data around as needed

name()

Parse a header name

linear_whitespace()

Parse LWS, replacing consecutive LWS characters with a single space

value()

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

value_char()

Parse a header value while outside quotes

quote()

See what state to move to while within quoted header values

quote_char()

Parse a header value while within quotes

quote_escaped()

Parse an escaped character within quotes

body()

Parse the body

Details

at line 7963
SimplePie_HTTP_Parser(string $data)

Create an instance of the class with the input data

Parameters

string $data Input data

at line 7975
bool parse()

Parse the input data

Return Value

bool true on success, false on failure

at line 8004
bool has_data()

Check whether there is data beyond the pointer

Return Value

bool true if there is further data, false if not

at line 8015
bool is_linear_whitespace()

See if the next character is LWS

Return Value

bool true if the next character is LWS, false if not

at line 8029
http_version()

Parse the HTTP version

at line 8058
status()

Parse the status code

at line 8077
reason()

Parse the reason phrase

at line 8090
new_line()

Deal with a new line, shifting data around as needed

at line 8128
name()

Parse a header name

at line 8156
linear_whitespace()

Parse LWS, replacing consecutive LWS characters with a single space

at line 8178
value()

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

at line 8210
value_char()

Parse a header value while outside quotes

at line 8223
quote()

See what state to move to while within quoted header values

at line 8260
quote_char()

Parse a header value while within quotes

at line 8273
quote_escaped()

Parse an escaped character within quotes

at line 8285
body()

Parse the body