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

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

TemplateNormalizationList.php

Zuletzt modifiziert: 02.04.2025, 15:04 - Dateigröße: 986.00 Bytes


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\Configurator\Collections;
09   
10  use s9e\TextFormatter\Configurator\TemplateNormalizations\AbstractNormalization;
11  use s9e\TextFormatter\Configurator\TemplateNormalizations\Custom;
12   
13  class TemplateNormalizationList extends NormalizedList
14  {
15      /**
16      * Normalize the value to an instance of AbstractNormalization
17      *
18      * @param  mixed                 $value Either a string, or an instance of AbstractNormalization
19      * @return AbstractNormalization        An instance of AbstractNormalization
20      */
21      public function normalizeValue($value)
22      {
23          if ($value instanceof AbstractNormalization)
24          {
25              return $value;
26          }
27   
28          if (is_callable($value))
29          {
30              return new Custom($value);
31          }
32   
33          $className = 's9e\\TextFormatter\\Configurator\\TemplateNormalizations\\' . $value;
34   
35          return new $className;
36      }
37  }