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 |
MapFilter.php
01 <?php
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\Parser\AttributeFilters;
09
10 class MapFilter
11 {
12 /**
13 * Filter a mapped value
14 *
15 * NOTE: if there's no match, the original value is returned
16 *
17 * @param string $attrValue Original value
18 * @param array $map List in the form [[<regexp>, <value>]]
19 * @return mixed Filtered value, or FALSE if invalid
20 */
21 public static function filter($attrValue, array $map)
22 {
23 foreach ($map as $pair)
24 {
25 if (preg_match($pair[0], $attrValue))
26 {
27 return $pair[1];
28 }
29 }
30
31 return $attrValue;
32 }
33 }