PHPackages                             mxrvx/schema-system-settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mxrvx/schema-system-settings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mxrvx/schema-system-settings
============================

System Settings Schema Builder for MODX Revolution

v1.0.10(10mo ago)0831MITPHPPHP &gt;=8.1

Since Apr 17Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/mxrvx/schema-system-settings)[ Packagist](https://packagist.org/packages/mxrvx/schema-system-settings)[ RSS](/packages/mxrvx-schema-system-settings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (12)Used By (1)

System Settings Schema Builder for MODX Revolution
==================================================

[](#system-settings-schema-builder-for-modx-revolution)

Installation and configuration
------------------------------

[](#installation-and-configuration)

Install the package via composer:

```
composer require --dev mxrvx/schema-system-settings

```

[![PHP](https://camo.githubusercontent.com/509173d37d436c897430739a70332e592a5527828e90c38af3872c959461644f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d787276782f736368656d612d73797374656d2d73657474696e67732e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/mxrvx/schema-system-settings)[![Latest Version on Packagist](https://camo.githubusercontent.com/9df96a17089367980c5c74bb89dd3e29d14138c49294605d34ae2dc7c9a3bd2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d787276782f736368656d612d73797374656d2d73657474696e67732e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/mxrvx/schema-system-settings)[![License](https://camo.githubusercontent.com/9b0d16a4140994588c6553ad19ebd98901bb3daf8eeef7f03a376bad3f712f5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d787276782f736368656d612d73797374656d2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/e835c21713140a7b27125705f9a2c9daa48922a48a5365d3f1346aff05d72f81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d787276782f736368656d612d73797374656d2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mxrvx/schema-system-settings)

Configuration
-------------

[](#configuration)

```
declare(strict_types=1);

use MXRVX\Schema\System\Settings;
use MXRVX\Schema\System\Settings\TypeCaster;

require_once \dirname(__DIR__, 1) . '\vendor\autoload.php';

$schema = Settings\Schema::define('app-namespace')
    ->withSettings(
        [
            Settings\Setting::define(
                key: 'key1',
                value: 1,
                xtype: 'combo-boolean',
                area: 'system',
                typecast: TypeCaster::BOOLEAN,
            ),
            Settings\Setting::define(
                key: 'key2',
                value: 'string',
                xtype: 'textfield',
                area: 'system',
                typecast: TypeCaster::STRING,
            ),
            Settings\Setting::define(
                key: 'key3',
                value: '312341241234',
                xtype: 'textfield',
                area: 'system',
                typecast: TypeCaster::INTEGER,
            ),
            Settings\Setting::define(
                key: 'key4',
                value: ['services' => ['github', 'bitbucket', 'google']],
                xtype: 'textfield',
                area: 'services',
                typecast: TypeCaster::ARRAY,
            ),
            Settings\Setting::define(
                key: 'key5',
                value: ['services' => ['github', 'bitbucket', 'google']],
                xtype: 'textfield',
                area: 'services',
                typecast: TypeCaster::JSON,
            ),
            Settings\Setting::define(
                key: 'key6',
                value: '1,2,3',
                xtype: 'textfield',
                area: 'services',
                typecast: [TypeCaster::STRING, TypeCaster::LIST_INTEGER],
            ),
        ]
    );
```

We can now create config after defining the scheme

```
/** @var \MXRVX\Schema\System\Settings\Schema $schema */
/** @var \MXRVX\Schema\System\Settings\SchemaConfig */
$schemaConfig = SchemaConfig::define($schema)->withConfig($config);
```

Usage
-----

[](#usage)

```
/** @var \MXRVX\Schema\System\Settings\SchemaConfig $schemaConfig */

//NOTE get setting value
$value = $schemaConfig->getSettingValue('key1');

//NOTE set setting value
$schemaConfig->setSettingValue('key1', $newValue);

//NOTE get all settings as array
var_export($schemaConfig->getSettingsArray(processValue: true));

array (
  'key1' =>
  array (
    'key' => 'app-namespace.key1',
    'value' => true,
    'xtype' => 'combo-boolean',
    'area' => 'system',
    'typecast' => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\BooleanCaster',
  ),
  'key2' =>
  array (
    'key' => 'app-namespace.key2',
    'value' => 'string',
    'xtype' => 'textfield',
    'area' => 'system',
    'typecast' => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\StringCaster',
  ),
  'key3' =>
  array (
    'key' => 'app-namespace.key3',
    'value' => 312341241234,
    'xtype' => 'textfield',
    'area' => 'system',
    'typecast' => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\IntegerCaster',
  ),
  'key4' =>
  array (
    'key' => 'app-namespace.key4',
    'value' =>
    array (
      'services' =>
      array (
        0 => 'github',
        1 => 'bitbucket',
        2 => 'google',
      ),
    ),
    'xtype' => 'textfield',
    'area' => 'services',
    'typecast' => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\ArrayCaster',
  ),
  'key5' =>
  array (
    'key' => 'app-namespace.key5',
    'value' => '{"services":["github","bitbucket","google"]}',
    'xtype' => 'textfield',
    'area' => 'services',
    'typecast' => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\JsonCaster',
  ),
  'key6' =>
  array (
    'key' => 'app-namespace.key6',
    'value' =>
    array (
      0 => 1,
      1 => 2,
      2 => 3,
    ),
    'xtype' => 'textfield',
    'area' => 'services',
    'typecast' =>
    array (
      0 => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\StringCaster',
      1 => 'MXRVX\\Schema\\System\\Settings\\TypeCasters\\ListIntegerCaster',
    ),
  ),
)
```

Feedback
--------

[](#feedback)

I will be glad to see your ideas, suggestions and questions in [issues](https://github.com/mxrvx/schema-system-settings/issues).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance53

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

11

Last Release

326d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v1.0.10PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/343f8c3c6c5e592667acd94919b830d48bc03320b0c0b718ecbb080c66100d08?d=identicon)[vgrish](/maintainers/vgrish)

---

Top Contributors

[![vladimirgrishin](https://avatars.githubusercontent.com/u/54804681?v=4)](https://github.com/vladimirgrishin "vladimirgrishin (12 commits)")[![vgrish](https://avatars.githubusercontent.com/u/3117525?v=4)](https://github.com/vgrish "vgrish (1 commits)")

---

Tags

modxmodx-revolutionmxrvxmodxrevolution

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mxrvx-schema-system-settings/health.svg)

```
[![Health](https://phpackages.com/badges/mxrvx-schema-system-settings/health.svg)](https://phpackages.com/packages/mxrvx-schema-system-settings)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
