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

ParserBase.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 962.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\Plugins;
09   
10  use s9e\TextFormatter\Parser;
11   
12  abstract class ParserBase
13  {
14      /**
15      * @var array
16      */
17      protected $config;
18   
19      /**
20      * @var Parser
21      */
22      protected $parser;
23   
24      /**
25      * Constructor
26      *
27      * @param Parser $parser
28      * @param array  $config
29      */
30      final public function __construct(Parser $parser, array $config)
31      {
32          $this->parser = $parser;
33          $this->config = $config;
34   
35          $this->setUp();
36      }
37   
38      /**
39      * Plugin's setup
40      *
41      * @return void
42      */
43      protected function setUp()
44      {
45      }
46   
47      /**
48      * @param  string $text
49      * @param  array  $matches If the config array has a "regexp" key, the corresponding matches are
50      *                         passed as second parameter. Otherwise, an empty array is passed
51      * @return void
52      */
53      abstract public function parse($text, array $matches);
54  }