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

UnsafeTemplateException.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.42 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\Configurator\Exceptions;
 09   
 10  use DOMNode;
 11  use RuntimeException;
 12  use s9e\TextFormatter\Configurator\Helpers\TemplateHelper;
 13   
 14  class UnsafeTemplateException extends RuntimeException
 15  {
 16      /**
 17      * @var DOMNode The node that is responsible for this exception
 18      */
 19      protected $node;
 20   
 21      /**
 22      * @param string  $msg  Exception message
 23      * @param DOMNode $node The node that is responsible for this exception
 24      */
 25      public function __construct($msg, DOMNode $node)
 26      {
 27          parent::__construct($msg);
 28          $this->node = $node;
 29      }
 30   
 31      /**
 32      * Return the node that has caused this exception
 33      *
 34      * @return DOMNode
 35      */
 36      public function getNode()
 37      {
 38          return $this->node;
 39      }
 40   
 41      /**
 42      * Highlight the source of the template that has caused this exception, with the node highlighted
 43      *
 44      * @param  string $prepend HTML to prepend
 45      * @param  string $append  HTML to append
 46      * @return string          Template's source, as HTML
 47      */
 48      public function highlightNode($prepend = '<span style="background-color:#ff0">', $append = '</span>')
 49      {
 50          return TemplateHelper::highlightNode($this->node, $prepend, $append);
 51      }
 52   
 53      /**
 54      * Change the node associated with this exception
 55      *
 56      * @param  DOMNode $node
 57      * @return void
 58      */
 59      public function setNode(DOMNode $node)
 60      {
 61          $this->node = $node;
 62      }
 63  }