Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
MessageInterface.php
001 <?php
002 namespace GuzzleHttp\Message;
003
004 use GuzzleHttp\Stream\StreamInterface;
005
006 /**
007 * Request and response message interface
008 */
009 interface MessageInterface
010 {
011 /**
012 * Get a string representation of the message
013 *
014 * @return string
015 */
016 public function __toString();
017
018 /**
019 * Get the HTTP protocol version of the message
020 *
021 * @return string
022 */
023 public function getProtocolVersion();
024
025 /**
026 * Sets the body of the message.
027 *
028 * The body MUST be a StreamInterface object. Setting the body to null MUST
029 * remove the existing body.
030 *
031 * @param StreamInterface|null $body Body.
032 */
033 public function setBody(StreamInterface $body = null);
034
035 /**
036 * Get the body of the message
037 *
038 * @return StreamInterface|null
039 */
040 public function getBody();
041
042 /**
043 * Gets all message headers.
044 *
045 * The keys represent the header name as it will be sent over the wire, and
046 * each value is an array of strings associated with the header.
047 *
048 * // Represent the headers as a string
049 * foreach ($message->getHeaders() as $name => $values) {
050 * echo $name . ": " . implode(", ", $values);
051 * }
052 *
053 * @return array Returns an associative array of the message's headers.
054 */
055 public function getHeaders();
056
057 /**
058 * Retrieve a header by the given case-insensitive name.
059 *
060 * @param string $header Case-insensitive header name.
061 *
062 * @return string
063 */
064 public function getHeader($header);
065
066 /**
067 * Retrieves a header by the given case-insensitive name as an array of strings.
068 *
069 * @param string $header Case-insensitive header name.
070 *
071 * @return string[]
072 */
073 public function getHeaderAsArray($header);
074
075 /**
076 * Checks if a header exists by the given case-insensitive name.
077 *
078 * @param string $header Case-insensitive header name.
079 *
080 * @return bool Returns true if any header names match the given header
081 * name using a case-insensitive string comparison. Returns false if
082 * no matching header name is found in the message.
083 */
084 public function hasHeader($header);
085
086 /**
087 * Remove a specific header by case-insensitive name.
088 *
089 * @param string $header Case-insensitive header name.
090 */
091 public function removeHeader($header);
092
093 /**
094 * Appends a header value to any existing values associated with the
095 * given header name.
096 *
097 * @param string $header Header name to add
098 * @param string $value Value of the header
099 */
100 public function addHeader($header, $value);
101
102 /**
103 * Merges in an associative array of headers.
104 *
105 * Each array key MUST be a string representing the case-insensitive name
106 * of a header. Each value MUST be either a string or an array of strings.
107 * For each value, the value is appended to any existing header of the same
108 * name, or, if a header does not already exist by the given name, then the
109 * header is added.
110 *
111 * @param array $headers Associative array of headers to add to the message
112 */
113 public function addHeaders(array $headers);
114
115 /**
116 * Sets a header, replacing any existing values of any headers with the
117 * same case-insensitive name.
118 *
119 * The header values MUST be a string or an array of strings.
120 *
121 * @param string $header Header name
122 * @param string|array $value Header value(s)
123 */
124 public function setHeader($header, $value);
125
126 /**
127 * Sets headers, replacing any headers that have already been set on the
128 * message.
129 *
130 * The array keys MUST be a string. The array values must be either a
131 * string or an array of strings.
132 *
133 * @param array $headers Headers to set.
134 */
135 public function setHeaders(array $headers);
136 }
137