composer package updates
[openemr.git] / vendor / doctrine / couchdb / lib / Doctrine / CouchDB / HTTP / Client.php
blob6277a797b42c417872e566f8e7b833630f54f375
1 <?php
2 /*
3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * This software consists of voluntary contributions made by many individuals
16 * and is licensed under the MIT license. For more information, see
17 * <http://www.doctrine-project.org>.
20 namespace Doctrine\CouchDB\HTTP;
22 interface Client
24 /**
25 * Perform a request to the server and return the result
27 * Perform a request to the server and return the result converted into a
28 * Response object. If you do not expect a JSON structure, which
29 * could be converted in such a response object, set the fourth parameter to
30 * true, and you get a response object returned, containing the raw body.
31 * Optional HTTP request headers can be passed in an array using the fifth
32 * parameter.
34 * @param string $method
35 * @param string $path
36 * @param string $data
37 * @param bool $raw
38 * @param array $headers
39 * @return Response
41 function request($method, $path, $data = null, $raw = false, array $headers = array());
43 /**
44 * Return the connection pointer or connection socket after setting up the
45 * connection.
47 * Return the connection pointer (for stream connection) or connection
48 * socket (for socket connection) after setting up the connection. The
49 * returned resource can be used to read and write data in small chunks
50 * reducing the memory usage.
52 * @param string $method
53 * @param string $path
54 * @param string $data
55 * @param array $headers
56 * @return resource
58 function getConnection($method, $path, $data = null, array $headers = array());