Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Gdata_App_LoggingHttpClientAdapterSocket Class Reference

Public Member Functions

 connect ($host, $port=80, $secure=false)
 Connect to the remote server.
 
 write ($method, $uri, $http_ver= '1.1', $headers=array(), $body= '')
 Send request to the remote server.
 
 read ()
 Read response from server.
 
 close ()
 Close the connection to the server.
 
- Public Member Functions inherited from Zend_Http_Client_Adapter_Socket
 __construct ()
 Adapter constructor, currently empty.
 
 setConfig ($config=array())
 Set the configuration array for the adapter.
 
 getConfig ()
 Retrieve the array of all configuration options.
 
 setStreamContext ($context)
 Set the stream context for the TCP connection to the server.
 
 getStreamContext ()
 Get the stream context for the TCP connection to the server.
 
 connect ($host, $port=80, $secure=false)
 Connect to the remote server.
 
 write ($method, $uri, $http_ver= '1.1', $headers=array(), $body= '')
 Send request to the remote server.
 
 read ()
 Read response from server.
 
 close ()
 Close the connection to the server.
 
 setOutputStream ($stream)
 Set output stream for the response.
 
 __destruct ()
 Destructor: make sure the socket is disconnected.
 

Protected Member Functions

 log ($message)
 Log the given message to the log file.
 
- Protected Member Functions inherited from Zend_Http_Client_Adapter_Socket
 _checkSocketReadTimeout ()
 Check if the socket has timed out - if so close connection and throw an exception.
 

Protected Attributes

 $log_handle = null
 
- Protected Attributes inherited from Zend_Http_Client_Adapter_Socket
 $socket = null
 
 $connected_to = array(null, null)
 
 $out_stream = null
 
 $config
 
 $method = null
 
 $_context = null
 

Member Function Documentation

close ( )

Close the connection to the server.

Implements Zend_Http_Client_Adapter_Interface.

connect (   $host,
  $port = 80,
  $secure = false 
)

Connect to the remote server.

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

Implements Zend_Http_Client_Adapter_Interface.

log (   $message)
protected

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.

Parameters
string$messageThe message to log
read ( )

Read response from server.

Returns
string

Implements Zend_Http_Client_Adapter_Interface.

write (   $method,
  $uri,
  $http_ver = '1.1',
  $headers = array(),
  $body = '' 
)

Send request to the remote server.

Parameters
string$method
Zend_Uri_Http$uri
string$http_ver
array$headers
string$body
Returns
string Request as string

Implements Zend_Http_Client_Adapter_Interface.

Member Data Documentation

$log_handle = null
protected