En vous promenant sur Beamreactor, nous stockons votre IP 48h pour des raisons de sécurité.

Lecteur Markdown

config Documentation › CONFIG_DOCUMENTATION_EN

CONFIG_DOCUMENTATION_EN

Feature: Config #

Administration interface for viewing, editing and deleting configuration overrides stored in the database. Allows replacing default configuration file values without modifying code.

---

Installation and Configuration #

Via FTP: Upload the `config/` directory into `/plugins/`.

Via package manager: Select `config` from the available plugins list.

Paths:

  • Main plugin: `/plugins/config/config.php`
  • Configuration: `/plugins/config/conf/config.conf.inc.php`
  • Library: `/plugins/config/lib/config.lib.inc.php`

Configuration parameters (`config.conf.inc.php`):

| Variable | Default | Description |

|---|---|---|

| `$basedatadisplay` | `'yes'` | Display in management interface |

| `$basedisplevel` | `BASE_LEVEL_ADMIN` | Minimum required level |

| `$ftype` | `3` | Plugin type (system) |

Required SQL table: `system_config`

---

Usage #

Administrator Interface #

  • View all configuration keys with their current value and source (default / database override).
  • Edit a value via an edit form.
  • Delete an override to revert to the default value.

Protected Keys #

Keys containing the following words cannot be edited through this interface:

usr, user, login, key, passwd, password, pass, pwd,
secret, authenticate, token, api_key, private

Supported Types #

The plugin automatically detects and restores the PHP type when reading: `bool`, `int`, `float`, `array`, `JSON`.

---

Hooks and Entry Points #

?obj=config.php                       — Override list
?obj=config.php&cfgact=edit&name=X    — Edit form
?obj=config.php&cfgact=save           — Save (POST)
?obj=config.php&cfgact=delete&name=X  — Delete an override

---

Dependencies #

  • `Beamreactor\Database\SQL` — read/write on `system_config`
  • `Beamreactor\Sanitizer\Parser` — submitted value sanitisation

Exposed Class #

`ConfigService` (namespace `Beamreactor\Config`):

| Method | Description |

|---|---|

| `get(string $name, $default)` | Read a value with database override |

| `getAll(bool $sanitized)` | Returns all keys with metadata |

| `set(string $name, $value, string $about)` | Create or update an override |

| `delete(string $name)` | Delete an override |

| `isSensitive(string $name)` | Check if the key is protected |

de en fr