Class SimplePie_HTTP_Parser

Description

HTTP Response Parser

Located in /libraries/simplepie/simplepie.php (line 7867)


	
			
Variable Summary
string $body
string $data
array $headers
string $name
int $position
string $reason
string $state
string $value
Method Summary
SimplePie_HTTP_Parser SimplePie_HTTP_Parser (string $data)
void body ()
bool has_data ()
void http_version ()
void name ()
void new_line ()
bool parse ()
void quote ()
void quote_char ()
void quote_escaped ()
void reason ()
void status ()
void value ()
void value_char ()
Variables
string $body = '' (line 7907)

Body of the response

  • access: public
string $data = '' (line 7923)

Input data

  • access: private
int $data_length = 0 (line 7931)

Input data length (to avoid calling strlen() everytime this is needed)

  • access: private
array $headers = array() (line 7899)

Key/value pairs of the headers

  • access: public
float $http_version = 0.0 (line 7875)

HTTP Version

  • access: public
string $name = '' (line 7947)

Name of the hedaer currently being parsed

  • access: private
int $position = 0 (line 7939)

Current position of the pointer

  • access: private
string $reason = '' (line 7891)

Reason phrase

  • access: public
string $state = 'http_version' (line 7915)

Current state of the state machine

  • access: private
int $status_code = 0 (line 7883)

Status code

  • access: public
string $value = '' (line 7955)

Value of the hedaer currently being parsed

  • access: private
Methods
Constructor SimplePie_HTTP_Parser (line 7963)

Create an instance of the class with the input data

  • access: public
SimplePie_HTTP_Parser SimplePie_HTTP_Parser (string $data)
  • string $data: Input data
body (line 8285)

Parse the body

  • access: private
void body ()
has_data (line 8004)

Check whether there is data beyond the pointer

  • return: true if there is further data, false if not
  • access: private
bool has_data ()
http_version (line 8029)

Parse the HTTP version

  • access: private
void http_version ()
is_linear_whitespace (line 8015)

See if the next character is LWS

  • return: true if the next character is LWS, false if not
  • access: private
bool is_linear_whitespace ()
linear_whitespace (line 8156)

Parse LWS, replacing consecutive LWS characters with a single space

  • access: private
void linear_whitespace ()
name (line 8128)

Parse a header name

  • access: private
void name ()
new_line (line 8090)

Deal with a new line, shifting data around as needed

  • access: private
void new_line ()
parse (line 7975)

Parse the input data

  • return: true on success, false on failure
  • access: public
bool parse ()
quote (line 8223)

See what state to move to while within quoted header values

  • access: private
void quote ()
quote_char (line 8260)

Parse a header value while within quotes

  • access: private
void quote_char ()
quote_escaped (line 8273)

Parse an escaped character within quotes

  • access: private
void quote_escaped ()
reason (line 8077)

Parse the reason phrase

  • access: private
void reason ()
status (line 8058)

Parse the status code

  • access: private
void status ()
value (line 8178)

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

  • access: private
void value ()
value_char (line 8210)

Parse a header value while outside quotes

  • access: private
void value_char ()

Documentation generated on Mon, 25 Jun 2012 13:59:35 -0500 by phpDocumentor 1.4.4