Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

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

config_variable.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.46 KiB


01  <?php
02  /**
03  *
04  * This file is part of the phpBB Forum Software package.
05  *
06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
07  * @license GNU General Public License, version 2 (GPL-2.0)
08  *
09  * For full copyright and license information, please see
10  * the docs/CREDITS.txt file.
11  *
12  */
13   
14  namespace phpbb\search\sphinx;
15   
16  /**
17  * \phpbb\search\sphinx\config_variable
18  * Represents a single variable inside the sphinx configuration
19  */
20  class config_variable
21  {
22      private $name;
23      private $value;
24      private $comment;
25   
26      /**
27      * Constructs a new variable object
28      *
29      * @param    string    $name        Name of the variable
30      * @param    string    $value        Value of the variable
31      * @param    string    $comment    Optional comment after the variable in the
32      *                                config file
33      *
34      * @access    public
35      */
36      function __construct($name, $value, $comment)
37      {
38          $this->name = $name;
39          $this->value = $value;
40          $this->comment = $comment;
41      }
42   
43      /**
44      * Getter for the variable's name
45      *
46      * @return    string    The variable object's name
47      *
48      * @access    public
49      */
50      function get_name()
51      {
52          return $this->name;
53      }
54   
55      /**
56      * Allows changing the variable's value
57      *
58      * @param    string    $value    New value for this variable
59      *
60      * @access    public
61      */
62      function set_value($value)
63      {
64          $this->value = $value;
65      }
66   
67      /**
68      * Turns this object into a string readable by sphinx
69      *
70      * @return    string    Config data in textual form
71      *
72      * @access    public
73      */
74      function to_string()
75      {
76          return "\t" . $this->name . ' = ' . str_replace("\n", " \\\n", $this->value) . ' ' . $this->comment . "\n";
77      }
78  }
79