Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

ResponseInterface.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 2.57 KiB


01  <?php
02   
03  declare(strict_types=1);
04   
05  namespace Psr\Http\Message;
06   
07  /**
08   * Representation of an outgoing, server-side response.
09   *
10   * Per the HTTP specification, this interface includes properties for
11   * each of the following:
12   *
13   * - Protocol version
14   * - Status code and reason phrase
15   * - Headers
16   * - Message body
17   *
18   * Responses are considered immutable; all methods that might change state MUST
19   * be implemented such that they retain the internal state of the current
20   * message and return an instance that contains the changed state.
21   */
22  interface ResponseInterface extends MessageInterface
23  {
24      /**
25       * Gets the response status code.
26       *
27       * The status code is a 3-digit integer result code of the server's attempt
28       * to understand and satisfy the request.
29       *
30       * @return int Status code.
31       */
32      public function getStatusCode();
33   
34      /**
35       * Return an instance with the specified status code and, optionally, reason phrase.
36       *
37       * If no reason phrase is specified, implementations MAY choose to default
38       * to the RFC 7231 or IANA recommended reason phrase for the response's
39       * status code.
40       *
41       * This method MUST be implemented in such a way as to retain the
42       * immutability of the message, and MUST return an instance that has the
43       * updated status and reason phrase.
44       *
45       * @link http://tools.ietf.org/html/rfc7231#section-6
46       * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
47       * @param int $code The 3-digit integer result code to set.
48       * @param string $reasonPhrase The reason phrase to use with the
49       *     provided status code; if none is provided, implementations MAY
50       *     use the defaults as suggested in the HTTP specification.
51       * @return static
52       * @throws \InvalidArgumentException For invalid status code arguments.
53       */
54      public function withStatus(int $code, string $reasonPhrase = '');
55   
56      /**
57       * Gets the response reason phrase associated with the status code.
58       *
59       * Because a reason phrase is not a required element in a response
60       * status line, the reason phrase value MAY be null. Implementations MAY
61       * choose to return the default RFC 7231 recommended reason phrase (or those
62       * listed in the IANA HTTP Status Code Registry) for the response's
63       * status code.
64       *
65       * @link http://tools.ietf.org/html/rfc7231#section-6
66       * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
67       * @return string Reason phrase; must return an empty string if none present.
68       */
69      public function getReasonPhrase();
70  }
71