PHP Класс SimplePie_HTTP_Parser, ojs

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$body string Body of the response
$data string Input data
$data_length integer Input data length (to avoid calling strlen() every time this is needed)
$headers array Key/value pairs of the headers
$http_version float HTTP Version
$name string Name of the hedaer currently being parsed
$position integer Current position of the pointer
$reason string Reason phrase
$state string Current state of the state machine
$status_code integer Status code
$value string Value of the hedaer currently being parsed

Открытые методы

Метод Описание
SimplePie_HTTP_Parser ( string $data ) Create an instance of the class with the input data
body ( ) Parse the body
has_data ( ) : boolean Check whether there is data beyond the pointer
http_version ( ) Parse the HTTP version
is_linear_whitespace ( ) : boolean See if the next character is LWS
linear_whitespace ( ) Parse LWS, replacing consecutive LWS characters with a single space
name ( ) Parse a header name
new_line ( ) Deal with a new line, shifting data around as needed
parse ( ) : boolean Parse the input data
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
reason ( ) Parse the reason phrase
status ( ) Parse the status code
value ( ) See what state to move to while within non-quoted header values
value_char ( ) Parse a header value while outside quotes

Описание методов

SimplePie_HTTP_Parser() публичный Метод

Create an instance of the class with the input data
public SimplePie_HTTP_Parser ( string $data )
$data string Input data

body() публичный Метод

Parse the body
public body ( )

has_data() публичный Метод

Check whether there is data beyond the pointer
public has_data ( ) : boolean
Результат boolean true if there is further data, false if not

http_version() публичный Метод

Parse the HTTP version
public http_version ( )

is_linear_whitespace() публичный Метод

See if the next character is LWS
public is_linear_whitespace ( ) : boolean
Результат boolean true if the next character is LWS, false if not

linear_whitespace() публичный Метод

Parse LWS, replacing consecutive LWS characters with a single space
public linear_whitespace ( )

name() публичный Метод

Parse a header name
public name ( )

new_line() публичный Метод

Deal with a new line, shifting data around as needed
public new_line ( )

parse() публичный Метод

Parse the input data
public parse ( ) : boolean
Результат boolean true on success, false on failure

quote() публичный Метод

See what state to move to while within quoted header values
public quote ( )

quote_char() публичный Метод

Parse a header value while within quotes
public quote_char ( )

quote_escaped() публичный Метод

Parse an escaped character within quotes
public quote_escaped ( )

reason() публичный Метод

Parse the reason phrase
public reason ( )

status() публичный Метод

Parse the status code
public status ( )

value() публичный Метод

See what state to move to while within non-quoted header values
public value ( )

value_char() публичный Метод

Parse a header value while outside quotes
public value_char ( )

Описание свойств

$body публичное свойство

Body of the response
public string $body
Результат string

$data публичное свойство

Input data
public string $data
Результат string

$data_length публичное свойство

Input data length (to avoid calling strlen() every time this is needed)
public int $data_length
Результат integer

$headers публичное свойство

Key/value pairs of the headers
public array $headers
Результат array

$http_version публичное свойство

HTTP Version
public float $http_version
Результат float

$name публичное свойство

Name of the hedaer currently being parsed
public string $name
Результат string

$position публичное свойство

Current position of the pointer
public int $position
Результат integer

$reason публичное свойство

Reason phrase
public string $reason
Результат string

$state публичное свойство

Current state of the state machine
public string $state
Результат string

$status_code публичное свойство

Status code
public int $status_code
Результат integer

$value публичное свойство

Value of the hedaer currently being parsed
public string $value
Результат string