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

RepositoryCollection.php

Zuletzt modifiziert: 02.04.2025, 15:04 - Dateigröße: 1.00 KiB


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\Plugins\BBCodes\Configurator;
09   
10  use s9e\TextFormatter\Configurator;
11  use s9e\TextFormatter\Configurator\Collections\NormalizedCollection;
12   
13  class RepositoryCollection extends NormalizedCollection
14  {
15      /**
16      * @var BBCodeMonkey Instance of BBCodeMonkey passed to new Repository instances
17      */
18      protected $bbcodeMonkey;
19   
20      /**
21      * Constructor
22      *
23      * @param  BBCodeMonkey $bbcodeMonkey Instance of BBCodeMonkey used to parse definitions
24      */
25      public function __construct(BBCodeMonkey $bbcodeMonkey)
26      {
27          $this->bbcodeMonkey = $bbcodeMonkey;
28      }
29   
30      /**
31      * Normalize a value for storage
32      *
33      * @param  mixed      $value Original value
34      * @return Repository        Normalized value
35      */
36      public function normalizeValue($value)
37      {
38          return ($value instanceof Repository)
39               ? $value
40               : new Repository($value, $this->bbcodeMonkey);
41      }
42  }