Class Protocol_HTTP_Base

Description

HTTP base class

This class is a base class to provide common methods to the following subclasses:

  • Protocol_HTTP
  • Protocol_CURL
TODO:
  • Allow chunked encoding when sending requests
  • Better separation of HTTP 1.1 and 1.0 features

Located in Program_Root/Protocol/Protocol_HTTP_Base.php (line 38)

Protocol
   |
   --Protocol_HTTP_Base
Direct descendents
Class Description
Protocol_CURL CURL class
Protocol_HTTP HTTP class
Variable Summary
Method Summary
bool disconnect ()
string format_request (object &$request, [object $proxy = null])
string host ([string $host = null])
string http_version ([string $http_version = null])
int max_header_lines ([int $max_header_lines = null])
int max_line_length ([int $max_line_length = null])
string peer_http_version ([string $peer_http_version = null])
int port ([int $port = null])
Variables
string $host (line 44)

Host

string $http_version = '1.1' (line 56)

client http version

int $max_header_lines = 128 (line 74)

Max header lines - maximum number of headers a response can contain (default: 128)

int $max_line_length = 4096 (line 68)

Max line lenght - maximum length of header lines (default: 4096)

string $peer_http_version = '1.0' (line 62)

peer http version (default: 1.0)

int $port = 80 (line 50)

Port (default: 80)

Inherited Variables

Inherited from Protocol

Protocol::$error_number
Protocol::$error_string
Protocol::$scheme
Protocol::$ua
Methods
disconnect (line 237)

Disconnect - override in subclass

bool disconnect ()
format_request (line 189)

Format request

string format_request (object &$request, [object $proxy = null])
  • object $request
  • object $proxy:

    optional (proxy should be specified as a URL object, eg. http://proxy_user:proxy_pass@proxy_host.com:8080)

get_default_port (line 177)

Get default port

void get_default_port ()
host (line 97)

Host - get/set

  • return:

    old value

string host ([string $host = null])
  • string $host:

    new value

http_version (line 121)

HTTP version - get/set

  • return:

    old value

string http_version ([string $http_version = null])
  • string $http_version:

    new value

max_header_lines (line 167)

Max header lines - get/set

  • return:

    old value

int max_header_lines ([int $max_header_lines = null])
  • int $max_header_lines:

    new value

max_line_length (line 153)

Max line length - get/set

  • return:

    old value

int max_line_length ([int $max_line_length = null])
  • int $max_line_length:

    new value

peer_http_version (line 139)

Peer HTTP version - get/set

  • return:

    old value

string peer_http_version ([string $peer_http_version = null])
  • string $peer_http_version:

    new value

port (line 109)

Port - get/set

  • return:

    old value

int port ([int $port = null])
  • int $port:

    new value

Inherited Methods

Inherited From Protocol

Protocol::Protocol()
Protocol::collect()
Protocol::create()
Protocol::get_error_number()
Protocol::get_error_string()
Protocol::has_error()
Protocol::implementor()
Protocol::is_error_connect()
Protocol::is_error_parse()
Protocol::is_error_read()
Protocol::is_error_timeout()
Protocol::is_error_write()
Protocol::set_error_number()
Protocol::set_error_string()

Documention generated on Wed, 16 Jul 2003 01:03:54 +0100 by phpDocumentor 1.2.0