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

AbstractMapFilter.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.27 KiB


 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\Items\AttributeFilters;
 09   
 10  use RuntimeException;
 11  use s9e\TextFormatter\Configurator\Helpers\ContextSafeness;
 12  use s9e\TextFormatter\Configurator\Items\AttributeFilter;
 13   
 14  abstract class AbstractMapFilter extends AttributeFilter
 15  {
 16      /**
 17      * {@inheritdoc}
 18      */
 19      public function asConfig()
 20      {
 21          if (!isset($this->vars['map']))
 22          {
 23              $name = preg_replace('(.*\\\\|Filter$)', '', get_class($this));
 24   
 25              throw new RuntimeException($name . " filter is missing a 'map' value");
 26          }
 27   
 28          return parent::asConfig();
 29      }
 30   
 31      /**
 32      * Assess the safeness of this attribute filter based on given list of strings
 33      *
 34      * @param  string[] $strings
 35      * @return void
 36      */
 37      protected function assessSafeness(array $strings): void
 38      {
 39          $str = implode('', $strings);
 40          foreach (['AsURL', 'InCSS', 'InJS'] as $context)
 41          {
 42              $callback = ContextSafeness::class . '::getDisallowedCharacters' . $context;
 43              foreach ($callback() as $char)
 44              {
 45                  if (strpos($str, $char) !== false)
 46                  {
 47                      continue 2;
 48                  }
 49              }
 50   
 51              $methodName = 'markAsSafe' . $context;
 52              $this->$methodName();
 53          }
 54      }
 55  }