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

BooleanOperators.php

Zuletzt modifiziert: 01.05.2026, 11:29 - Dateigröße: 1.26 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\RendererGenerators\PHP\XPathConvertor\Convertors;
 09   
 10  class BooleanOperators extends AbstractConvertor
 11  {
 12      /**
 13      * {@inheritdoc}
 14      */
 15      public function getMatchers(): array
 16      {
 17          return [
 18              'BooleanExpression:And'  => '((?&Boolean)) and ((?&BooleanExpression)|(?&Boolean))',
 19              'Boolean:BooleanSubExpr' => '\\( ((?&BooleanExpression)|(?&Boolean)) \\)',
 20              'BooleanExpression:Or'   => '((?&Boolean)) or ((?&BooleanExpression)|(?&Boolean))'
 21          ];
 22      }
 23   
 24      /**
 25      * Convert a "and" operation
 26      *
 27      * @param  string $expr1
 28      * @param  string $expr2
 29      * @return string
 30      */
 31      public function parseAnd($expr1, $expr2)
 32      {
 33          return $this->recurse($expr1) . '&&' . $this->recurse($expr2);
 34      }
 35   
 36      /**
 37      * Convert a boolean subexpression
 38      *
 39      * @param  string $expr
 40      * @return string
 41      */
 42      public function parseBooleanSubExpr($expr)
 43      {
 44          return '(' . $this->recurse($expr) . ')';
 45      }
 46   
 47      /**
 48      * Convert a "or" operation
 49      *
 50      * @param  string $expr1
 51      * @param  string $expr2
 52      * @return string
 53      */
 54      public function parseOr($expr1, $expr2)
 55      {
 56          return $this->recurse($expr1) . '||' . $this->recurse($expr2);
 57      }
 58  }