Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
A sockets based (stream_socket_client) adapter class for Zend_Http_Client. Can be used on almost every PHP environment, and does not require any special extensions.
resource $_context = 'null'Stream context
 Details
 Detailsarray $config = 'array'Parameters array
 Details
 Detailsarray $connected_to = 'array'What host/port are we connected to?
 Details
 Detailsstring $method = 'null'Request method - will be set by write() and might be used by read()
 Details
 Detailsresource $out_stream = 'null'Stream for storing output
 Details
 Detailsresource|null $socket = 'null'The socket for server connection
 Details
 Details__construct(
          
          )
        
        :
        Adapter constructor, currently empty. Config is set using setConfig()
 Details
 Details__destruct(
          
          )
        
        :
        Destructor: make sure the socket is disconnected
If we are in persistent TCP mode, will not close the connection
 Details
 Details_checkSocketReadTimeout(
          
          )
        
        :
        Check if the socket has timed out - if so close connection and throw an exception
 Details
 Detailsclose(
          
          )
        
        :
        Close the connection to the server
 Details
 Detailsconnect(
          string $host, int $port
              =
              80, boolean $secure
              =
              false
          )
        
        :
        Connect to the remote server
 Details
 DetailsgetConfig(
          
          )
        
        :
        arrayRetrieve the array of all configuration options
 Details
 DetailsgetStreamContext(
          
          )
        
        :
        resourceGet the stream context for the TCP connection to the server.
If no stream context is set, will create a default one.
 Details
 Detailsread(
          
          )
        
        :
        stringRead response from server
 Details
 DetailssetConfig(
          Zend_Config $config
              =
              array
          )
        
        :
        Set the configuration array for the adapter
 Details
 DetailssetOutputStream(
          resource $stream
          )
        
        :
        Zend_Http_Client_Adapter_SocketSet output stream for the response
 Details
 DetailssetStreamContext(
          mixed $context
          )
        
        :
        Zend_Http_Client_Adapter_SocketSet the stream context for the TCP connection to the server
Can accept either a pre-existing stream context resource, or an array of stream options, similar to the options array passed to the stream_context_create() PHP function. In such case a new stream context will be created using the passed options.
 Details
 Detailswrite(
          string $method, Zend_Uri_Http $uri, string $http_ver
              =
              1.1, array $headers
              =
              array, string $body
          )
        
        :
        stringSend request to the remote server
 Details
 Details