Subversion Repositories php-qbpwcf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 1
<?php
2
 
3
namespace Guzzle\Http\Message;
4
 
5
/**
6
 * Request and response message interface
7
 */
8
interface MessageInterface
9
{
10
    /**
11
     * Get application and plugin specific parameters set on the message.
12
     *
13
     * @return \Guzzle\Common\Collection
14
     */
15
    public function getParams();
16
 
17
    /**
18
     * Add a header to an existing collection of headers.
19
     *
20
     * @param string $header Header name to add
21
     * @param string $value  Value of the header
22
     *
23
     * @return self
24
     */
25
    public function addHeader($header, $value);
26
 
27
    /**
28
     * Add and merge in an array of HTTP headers.
29
     *
30
     * @param array $headers Associative array of header data.
31
     *
32
     * @return self
33
     */
34
    public function addHeaders(array $headers);
35
 
36
    /**
37
     * Retrieve an HTTP header by name. Performs a case-insensitive search of all headers.
38
     *
39
     * @param string $header Header to retrieve.
40
     *
41
     * @return Header|null
42
     */
43
    public function getHeader($header);
44
 
45
    /**
46
     * Get all headers as a collection
47
     *
48
     * @return \Guzzle\Http\Message\Header\HeaderCollection
49
     */
50
    public function getHeaders();
51
 
52
    /**
53
     * Check if the specified header is present.
54
     *
55
     * @param string $header The header to check.
56
     *
57
     * @return bool
58
     */
59
    public function hasHeader($header);
60
 
61
    /**
62
     * Remove a specific HTTP header.
63
     *
64
     * @param string $header HTTP header to remove.
65
     *
66
     * @return self
67
     */
68
    public function removeHeader($header);
69
 
70
    /**
71
     * Set an HTTP header and overwrite any existing value for the header
72
     *
73
     * @param string $header Name of the header to set.
74
     * @param mixed  $value  Value to set.
75
     *
76
     * @return self
77
     */
78
    public function setHeader($header, $value);
79
 
80
    /**
81
     * Overwrite all HTTP headers with the supplied array of headers
82
     *
83
     * @param array $headers Associative array of header data.
84
     *
85
     * @return self
86
     */
87
    public function setHeaders(array $headers);
88
 
89
    /**
90
     * Get an array of message header lines (e.g. ["Host: example.com", ...])
91
     *
92
     * @return array
93
     */
94
    public function getHeaderLines();
95
 
96
    /**
97
     * Get the raw message headers as a string
98
     *
99
     * @return string
100
     */
101
    public function getRawHeaders();
102
}