## Zend_Gdata_App_LoggingHttpClientAdapterSocket

Description

Overrides the traditional socket-based adapter class for Zend_Http_Client to enable logging of requests. All requests are logged to a location specified in the config as $config['logfile']. Requests and responses are logged after they are sent and received/processed, thus an error could prevent logging.

- copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- license: New BSD License

Located in /Gdata/App/LoggingHttpClientAdapterSocket.php (line 41)

    Zend_Http_Client_Adapter_Socket
       |
       --Zend_Gdata_App_LoggingHttpClientAdapterSocket

Variable Summary
resource|null $log_handle
Method Summary
void close ()
void connect (string $host, [int $port = 80], [boolean $secure = false], int $timeout)
void log (string $message)
string read ()
string write (string $method, Zend_Uri_Http $uri, [string $http_ver = '1.1'], [array $headers = array()], [string $body = ''])
Variables
resource|null $log_handle = null (line 49)

The file handle for writing logs

- access: protected

#### Inherited Variables

Inherited from Zend_Http_Client_Adapter_Socket

> Zend_Http_Client_Adapter_Socket::$config
> Zend_Http_Client_Adapter_Socket::$connected_to
> Zend_Http_Client_Adapter_Socket::$method
> Zend_Http_Client_Adapter_Socket::$out_stream
> Zend_Http_Client_Adapter_Socket::$socket
> Zend_Http_Client_Adapter_Socket::$_context

Methods
close (line 113)

Close the connection to the server

- access: public

void close ()

Redefinition of:

Zend_Http_Client_Adapter_Socket::close()
  Close the connection to the server

connect (line 74)

Connect to the remote server

- access: public

void connect (string $host, [int $port = 80], [boolean $secure = false], int $timeout)

- string $host
- int $port
- boolean $secure
- int $timeout

Redefinition of:

Zend_Http_Client_Adapter_Socket::connect()
  Connect to the remote server

log (line 58)

Log the given message to the log file. The log file is configured as the config param 'logfile'. This method opens the file for writing if necessary.

- access: protected

void log (string $message)

- string $message: The message to log

read (line 102)

Read response from server

- access: public

string read ()

Redefinition of:

Zend_Http_Client_Adapter_Socket::read()
  Read response from server

write (line 90)

Send request to the remote server

- return: Request as string
- access: public

string write (string $method, Zend_Uri_Http $uri, [string $http_ver = '1.1'], [array $headers = array()], [string $body = ''])

- string $method
- Zend_Uri_Http $uri
- string $http_ver
- array $headers
- string $body

Redefinition of:

Zend_Http_Client_Adapter_Socket::write()
  Send request to the remote server

#### Inherited Methods

Inherited From Zend_Http_Client_Adapter_Socket

> Zend_Http_Client_Adapter_Socket::__construct()
> Zend_Http_Client_Adapter_Socket::close()
> Zend_Http_Client_Adapter_Socket::connect()
> Zend_Http_Client_Adapter_Socket::getConfig()
> Zend_Http_Client_Adapter_Socket::getStreamContext()
> Zend_Http_Client_Adapter_Socket::read()
> Zend_Http_Client_Adapter_Socket::setConfig()
> Zend_Http_Client_Adapter_Socket::setOutputStream()
> Zend_Http_Client_Adapter_Socket::setStreamContext()
> Zend_Http_Client_Adapter_Socket::write()
> Zend_Http_Client_Adapter_Socket::_checkSocketReadTimeout()
> Zend_Http_Client_Adapter_Socket::__destruct()

Documentation generated on Tue, 26 Oct 2010 20:08:55 +0400 by phpDocumentor 1.4.2