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

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

SurrogateInterface.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 2.94 KiB


 001  <?php
 002   
 003  /*
 004   * This file is part of the Symfony package.
 005   *
 006   * (c) Fabien Potencier <fabien@symfony.com>
 007   *
 008   * For the full copyright and license information, please view the LICENSE
 009   * file that was distributed with this source code.
 010   */
 011   
 012  namespace Symfony\Component\HttpKernel\HttpCache;
 013   
 014  use Symfony\Component\HttpFoundation\Request;
 015  use Symfony\Component\HttpFoundation\Response;
 016   
 017  interface SurrogateInterface
 018  {
 019      /**
 020       * Returns surrogate name.
 021       *
 022       * @return string
 023       */
 024      public function getName();
 025   
 026      /**
 027       * Returns a new cache strategy instance.
 028       *
 029       * @return ResponseCacheStrategyInterface A ResponseCacheStrategyInterface instance
 030       */
 031      public function createCacheStrategy();
 032   
 033      /**
 034       * Checks that at least one surrogate has Surrogate capability.
 035       *
 036       * @param Request $request A Request instance
 037       *
 038       * @return bool true if one surrogate has Surrogate capability, false otherwise
 039       */
 040      public function hasSurrogateCapability(Request $request);
 041   
 042      /**
 043       * Adds Surrogate-capability to the given Request.
 044       *
 045       * @param Request $request A Request instance
 046       */
 047      public function addSurrogateCapability(Request $request);
 048   
 049      /**
 050       * Adds HTTP headers to specify that the Response needs to be parsed for Surrogate.
 051       *
 052       * This method only adds an Surrogate HTTP header if the Response has some Surrogate tags.
 053       *
 054       * @param Response $response A Response instance
 055       */
 056      public function addSurrogateControl(Response $response);
 057   
 058      /**
 059       * Checks that the Response needs to be parsed for Surrogate tags.
 060       *
 061       * @param Response $response A Response instance
 062       *
 063       * @return bool true if the Response needs to be parsed, false otherwise
 064       */
 065      public function needsParsing(Response $response);
 066   
 067      /**
 068       * Renders a Surrogate tag.
 069       *
 070       * @param string $uri          A URI
 071       * @param string $alt          An alternate URI
 072       * @param bool   $ignoreErrors Whether to ignore errors or not
 073       * @param string $comment      A comment to add as an esi:include tag
 074       *
 075       * @return string
 076       */
 077      public function renderIncludeTag($uri, $alt = null, $ignoreErrors = true, $comment = '');
 078   
 079      /**
 080       * Replaces a Response Surrogate tags with the included resource content.
 081       *
 082       * @param Request  $request  A Request instance
 083       * @param Response $response A Response instance
 084       *
 085       * @return Response
 086       */
 087      public function process(Request $request, Response $response);
 088   
 089      /**
 090       * Handles a Surrogate from the cache.
 091       *
 092       * @param HttpCache $cache        An HttpCache instance
 093       * @param string    $uri          The main URI
 094       * @param string    $alt          An alternative URI
 095       * @param bool      $ignoreErrors Whether to ignore errors or not
 096       *
 097       * @return string
 098       *
 099       * @throws \RuntimeException
 100       * @throws \Exception
 101       */
 102      public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors);
 103  }
 104