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

IRProcessor.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.76 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\Helpers\TemplateParser;
 09   
 10  use DOMDocument;
 11  use DOMElement;
 12  use DOMNode;
 13  use DOMXPath;
 14   
 15  abstract class IRProcessor
 16  {
 17      /**
 18      * XSL namespace
 19      */
 20      const XMLNS_XSL = 'http://www.w3.org/1999/XSL/Transform';
 21   
 22      /**
 23      * @var DOMXPath
 24      */
 25      protected $xpath;
 26   
 27      /**
 28      * Create and append an element to given node in the IR
 29      *
 30      * @param  DOMElement $parentNode Parent node of the element
 31      * @param  string     $name       Tag name of the element
 32      * @param  string     $value      Value of the element
 33      * @return DOMElement             The created element
 34      */
 35      protected function appendElement(DOMElement $parentNode, $name, $value = '')
 36      {
 37          return $parentNode->appendChild($parentNode->ownerDocument->createElement($name, $value));
 38      }
 39   
 40      /**
 41      * Create and store an instance of DOMXPath for given document
 42      *
 43      * @param  DOMDocument $dom
 44      * @return void
 45      */
 46      protected function createXPath(DOMDocument $dom)
 47      {
 48          $this->xpath = new DOMXPath($dom);
 49      }
 50   
 51      /**
 52      * Evaluate an XPath expression and return its result
 53      *
 54      * @param  string  $expr XPath expression
 55      * @param  DOMNode $node Context node
 56      * @return mixed
 57      */
 58      protected function evaluate($expr, DOMNode $node = null)
 59      {
 60          return (isset($node)) ? $this->xpath->evaluate($expr, $node) : $this->xpath->evaluate($expr);
 61      }
 62   
 63      /**
 64      * Run an XPath query and return its result
 65      *
 66      * @param  string       $query XPath query
 67      * @param  DOMNode      $node  Context node
 68      * @return \DOMNodeList
 69      */
 70      protected function query($query, DOMNode $node = null)
 71      {
 72          return (isset($node)) ? $this->xpath->query($query, $node) : $this->xpath->query($query);
 73      }
 74  }