]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - Zend/Http/Client/Adapter/Interface.php
Release 6.5.0
[Github/sugarcrm.git] / Zend / Http / Client / Adapter / Interface.php
1 <?php
2
3 /**
4  * Zend Framework
5  *
6  * LICENSE
7  *
8  * This source file is subject to the new BSD license that is bundled
9  * with this package in the file LICENSE.txt.
10  * It is also available through the world-wide-web at this URL:
11  * http://framework.zend.com/license/new-bsd
12  * If you did not receive a copy of the license and are unable to
13  * obtain it through the world-wide-web, please send an email
14  * to license@zend.com so we can send you a copy immediately.
15  *
16  * @category   Zend
17  * @package    Zend_Http
18  * @subpackage Client_Adapter
19
20  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
21  * @license    http://framework.zend.com/license/new-bsd     New BSD License
22  */
23
24 /**
25  * An interface description for Zend_Http_Client_Adapter classes.
26  *
27  * These classes are used as connectors for Zend_Http_Client, performing the
28  * tasks of connecting, writing, reading and closing connection to the server.
29  *
30  * @category   Zend
31  * @package    Zend_Http
32  * @subpackage Client_Adapter
33  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
35  */
36 interface Zend_Http_Client_Adapter_Interface
37 {
38     /**
39      * Set the configuration array for the adapter
40      *
41      * @param array $config
42      */
43     public function setConfig($config = array());
44
45     /**
46      * Connect to the remote server
47      *
48      * @param string  $host
49      * @param int     $port
50      * @param boolean $secure
51      */
52     public function connect($host, $port = 80, $secure = false);
53
54     /**
55      * Send request to the remote server
56      *
57      * @param string        $method
58      * @param Zend_Uri_Http $url
59      * @param string        $http_ver
60      * @param array         $headers
61      * @param string        $body
62      * @return string Request as text
63      */
64     public function write($method, $url, $http_ver = '1.1', $headers = array(), $body = '');
65
66     /**
67      * Read response from server
68      *
69      * @return string
70      */
71     public function read();
72
73     /**
74      * Close the connection to the server
75      *
76      */
77     public function close();
78 }