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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
SurrogateInterface.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\HttpKernel\HttpCache;
13
14 use Symfony\Component\HttpFoundation\Request;
15 use Symfony\Component\HttpFoundation\Response;
16
17 interface SurrogateInterface
18 {
19 /**
20 * Returns surrogate name.
21 *
22 * @return string
23 */
24 public function getName();
25
26 /**
27 * Returns a new cache strategy instance.
28 *
29 * @return ResponseCacheStrategyInterface A ResponseCacheStrategyInterface instance
30 */
31 public function createCacheStrategy();
32
33 /**
34 * Checks that at least one surrogate has Surrogate capability.
35 *
36 * @return bool true if one surrogate has Surrogate capability, false otherwise
37 */
38 public function hasSurrogateCapability(Request $request);
39
40 /**
41 * Adds Surrogate-capability to the given Request.
42 */
43 public function addSurrogateCapability(Request $request);
44
45 /**
46 * Adds HTTP headers to specify that the Response needs to be parsed for Surrogate.
47 *
48 * This method only adds an Surrogate HTTP header if the Response has some Surrogate tags.
49 */
50 public function addSurrogateControl(Response $response);
51
52 /**
53 * Checks that the Response needs to be parsed for Surrogate tags.
54 *
55 * @return bool true if the Response needs to be parsed, false otherwise
56 */
57 public function needsParsing(Response $response);
58
59 /**
60 * Renders a Surrogate tag.
61 *
62 * @param string $uri A URI
63 * @param string $alt An alternate URI
64 * @param bool $ignoreErrors Whether to ignore errors or not
65 * @param string $comment A comment to add as an esi:include tag
66 *
67 * @return string
68 */
69 public function renderIncludeTag($uri, $alt = null, $ignoreErrors = true, $comment = '');
70
71 /**
72 * Replaces a Response Surrogate tags with the included resource content.
73 *
74 * @return Response
75 */
76 public function process(Request $request, Response $response);
77
78 /**
79 * Handles a Surrogate from the cache.
80 *
81 * @param HttpCache $cache An HttpCache instance
82 * @param string $uri The main URI
83 * @param string $alt An alternative URI
84 * @param bool $ignoreErrors Whether to ignore errors or not
85 *
86 * @return string
87 *
88 * @throws \RuntimeException
89 * @throws \Exception
90 */
91 public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors);
92 }
93