Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

RequestInterface.php

Zuletzt modifiziert: 01.05.2026, 11:26 - Dateigröße: 4.75 KiB


 001  <?php
 002   
 003  declare(strict_types=1);
 004   
 005  namespace Psr\Http\Message;
 006   
 007  /**
 008   * Representation of an outgoing, client-side request.
 009   *
 010   * Per the HTTP specification, this interface includes properties for
 011   * each of the following:
 012   *
 013   * - Protocol version
 014   * - HTTP method
 015   * - URI
 016   * - Headers
 017   * - Message body
 018   *
 019   * During construction, implementations MUST attempt to set the Host header from
 020   * a provided URI if no Host header is provided.
 021   *
 022   * Requests are considered immutable; all methods that might change state MUST
 023   * be implemented such that they retain the internal state of the current
 024   * message and return an instance that contains the changed state.
 025   */
 026  interface RequestInterface extends MessageInterface
 027  {
 028      /**
 029       * Retrieves the message's request target.
 030       *
 031       * Retrieves the message's request-target either as it will appear (for
 032       * clients), as it appeared at request (for servers), or as it was
 033       * specified for the instance (see withRequestTarget()).
 034       *
 035       * In most cases, this will be the origin-form of the composed URI,
 036       * unless a value was provided to the concrete implementation (see
 037       * withRequestTarget() below).
 038       *
 039       * If no URI is available, and no request-target has been specifically
 040       * provided, this method MUST return the string "/".
 041       *
 042       * @return string
 043       */
 044      public function getRequestTarget();
 045   
 046      /**
 047       * Return an instance with the specific request-target.
 048       *
 049       * If the request needs a non-origin-form request-target — e.g., for
 050       * specifying an absolute-form, authority-form, or asterisk-form —
 051       * this method may be used to create an instance with the specified
 052       * request-target, verbatim.
 053       *
 054       * This method MUST be implemented in such a way as to retain the
 055       * immutability of the message, and MUST return an instance that has the
 056       * changed request target.
 057       *
 058       * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
 059       *     request-target forms allowed in request messages)
 060       * @param string $requestTarget
 061       * @return static
 062       */
 063      public function withRequestTarget(string $requestTarget);
 064   
 065      /**
 066       * Retrieves the HTTP method of the request.
 067       *
 068       * @return string Returns the request method.
 069       */
 070      public function getMethod();
 071   
 072      /**
 073       * Return an instance with the provided HTTP method.
 074       *
 075       * While HTTP method names are typically all uppercase characters, HTTP
 076       * method names are case-sensitive and thus implementations SHOULD NOT
 077       * modify the given string.
 078       *
 079       * This method MUST be implemented in such a way as to retain the
 080       * immutability of the message, and MUST return an instance that has the
 081       * changed request method.
 082       *
 083       * @param string $method Case-sensitive method.
 084       * @return static
 085       * @throws \InvalidArgumentException for invalid HTTP methods.
 086       */
 087      public function withMethod(string $method);
 088   
 089      /**
 090       * Retrieves the URI instance.
 091       *
 092       * This method MUST return a UriInterface instance.
 093       *
 094       * @link http://tools.ietf.org/html/rfc3986#section-4.3
 095       * @return UriInterface Returns a UriInterface instance
 096       *     representing the URI of the request.
 097       */
 098      public function getUri();
 099   
 100      /**
 101       * Returns an instance with the provided URI.
 102       *
 103       * This method MUST update the Host header of the returned request by
 104       * default if the URI contains a host component. If the URI does not
 105       * contain a host component, any pre-existing Host header MUST be carried
 106       * over to the returned request.
 107       *
 108       * You can opt-in to preserving the original state of the Host header by
 109       * setting `$preserveHost` to `true`. When `$preserveHost` is set to
 110       * `true`, this method interacts with the Host header in the following ways:
 111       *
 112       * - If the Host header is missing or empty, and the new URI contains
 113       *   a host component, this method MUST update the Host header in the returned
 114       *   request.
 115       * - If the Host header is missing or empty, and the new URI does not contain a
 116       *   host component, this method MUST NOT update the Host header in the returned
 117       *   request.
 118       * - If a Host header is present and non-empty, this method MUST NOT update
 119       *   the Host header in the returned request.
 120       *
 121       * This method MUST be implemented in such a way as to retain the
 122       * immutability of the message, and MUST return an instance that has the
 123       * new UriInterface instance.
 124       *
 125       * @link http://tools.ietf.org/html/rfc3986#section-4.3
 126       * @param UriInterface $uri New request URI to use.
 127       * @param bool $preserveHost Preserve the original state of the Host header.
 128       * @return static
 129       */
 130      public function withUri(UriInterface $uri, bool $preserveHost = false);
 131  }
 132