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 |
CachingRecursiveParser.php
01 <?php declare(strict_types=1);
02
03 /**
04 * @package s9e\TextFormatter
05 * @copyright Copyright (c) 2010-2022 The s9e authors
06 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
07 */
08 namespace s9e\TextFormatter\Configurator\RecursiveParser;
09
10 use s9e\TextFormatter\Configurator\RecursiveParser;
11
12 class CachingRecursiveParser extends RecursiveParser
13 {
14 /**
15 * @var array
16 */
17 protected $cache;
18
19 /**
20 * {@inheritdoc}
21 */
22 public function parse(string $str, string $restrict = '')
23 {
24 if (!isset($this->cache[$restrict][$str]))
25 {
26 $this->cache[$restrict][$str] = parent::parse($str, $restrict);
27 }
28
29 return $this->cache[$restrict][$str];
30 }
31
32 /**
33 * {@inheritdoc}
34 */
35 public function setMatchers(array $matchers): void
36 {
37 $this->cache = [];
38 parent::setMatchers($matchers);
39 }
40 }