PHPackages                             cakemanager/cakephp-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. [Database &amp; ORM](/categories/database)
4. /
5. cakemanager/cakephp-settings

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

cakemanager/cakephp-settings
============================

Settings plugin for CakePHP

1.1.0(10y ago)236.8k17[4 PRs](https://github.com/cakemanager/cakephp-settings/pulls)2PHPPHP &gt;=5.4

Since Jan 26Pushed 8y ago4 watchersCompare

[ Source](https://github.com/cakemanager/cakephp-settings)[ Packagist](https://packagist.org/packages/cakemanager/cakephp-settings)[ RSS](/packages/cakemanager-cakephp-settings/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (2)

Settings plugin for CakePHP
===========================

[](#settings-plugin-for-cakephp)

[![Build Status](https://camo.githubusercontent.com/ec3dbea402df4984ab0943cdb02bb19f24ca46f82f574884a78c4d14cf015d3e/68747470733a2f2f7472617669732d63692e6f72672f63616b656d616e616765722f63616b657068702d73657474696e67732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cakemanager/cakephp-settings)[![Coverage Status](https://camo.githubusercontent.com/391896e3d139c3211ec4c65f9874070186f93d246e0d0436a566357390369e88/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f63616b656d616e616765722f63616b657068702d73657474696e67732f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/cakemanager/cakephp-settings?branch=master)[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/cakemanager/cakephp-settings?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

The Settings Plugin allows you to manage your settings (normally used with cake's `Configure`-class) in your database.

- Is easy to use: you can use the `Configure::read()` and `Configure::write()` methods via the [`Setting`-class](#using-the-class).
- Also, you are able to read and write settings by your [console](#using-the-shell).
- Last but not least: If you use the [CakeAdmin Plugin](https://github.com/cakemanager/cakephp-cakeadmin) you get an [automatically generated form](#using-the-settings-form) :).

> Note: The Settings-plugin is prefix-minded. An example: `Prefix.Name`.

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org). For existing applications you can add the following to your `composer.json` file:

```
"require": {
	"cakemanager/cakephp-settings": "dev-master"
}
```

And run `/composer update`.

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

[](#configuration)

You will need to add the following line to your application's bootstrap.php file:

```
Plugin::load('Settings', ['bootstrap' => true, 'routes' => true]);

// or run in your shell

$ bin/cake plugin load -b -r Settings
```

Next you need to create the table. Use the following command to initialize the settings-table.

```
$ bin/cake migrations migrate -p Settings

```

Usage
-----

[](#usage)

The `Setting`-class works the same like the `Configure`-class from CakePHP itself.

You can include the class with:

```
use Settings\Core\Setting;
```

### Write

[](#write)

You can write settings with the following:

```
Setting::write('App.Name', 'Custom Name');
```

The value `Custom Name` is now written to the database with the key `App.Name`. The empty array can contain multiple options

### Read

[](#read)

Now we gonna read the value from our just created key. Use:

```
Setting::read('App.Name');
```

This will return our value: `Custom Name`.

### Register

[](#register)

To prevent missing configurations when migrating to another environment the `register` method is introduced. Use the following to make sure the configuration exists in your application:

```
Setting::register('App.Name', 'Default Value', []);
```

#### Options

[](#options)

The following options are available:

- `description` - Description of your setting.
- `type` - Type to use like `text`, `select`, and more.
- `options` - Array with available options. In combination with the `type = select` option, this will generate a select-box with the given options.
- `editable` - Bool if the setting should be editable.
- `weight` - Weight (order) of the setting.

The options key can handle multiple types. You can define an array with options, but you can also create a close to prevent long queries on every request. Example:

```
Setting::register('App.Index', false, [
    'options' => function() {
        return TableRegistry::get('Blogs')->find('list')->toArray();
    }
]);
```

Using the setting-forms
-----------------------

[](#using-the-setting-forms)

If you are using the [CakeAdmin Plugin](https://github.com/cakemanager/cakephp-cakeadmin), we will create a default form where you can edit your settings (if the field `editable` isset to `1`). The Settings-Plugin will automatically add a menu-item to the admin-area.

If you click the menu-item you will see a list with all editable settings who contains the chosen prefix (or default: `App`).

### Register

[](#register-1)

To add your prefix to the settings-list use the following:

```
Configure::write('Settings.Prefixes.Test', 'Test');
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 89.7% 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 ~183 days

Total

3

Last Release

3763d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db071075007a1fb258b395c5e618b3e2409fdf69a07006ae0d847a38be3d8ade?d=identicon)[bobmulder](/maintainers/bobmulder)

---

Top Contributors

[![bobmulder](https://avatars.githubusercontent.com/u/5465074?v=4)](https://github.com/bobmulder "bobmulder (52 commits)")[![jpkleemans](https://avatars.githubusercontent.com/u/5700014?v=4)](https://github.com/jpkleemans "jpkleemans (2 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (2 commits)")[![Casmo](https://avatars.githubusercontent.com/u/385764?v=4)](https://github.com/Casmo "Casmo (1 commits)")[![leoruhland](https://avatars.githubusercontent.com/u/1785552?v=4)](https://github.com/leoruhland "leoruhland (1 commits)")

---

Tags

Settingsormcakephpconfigure

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cakemanager-cakephp-settings/health.svg)

```
[![Health](https://phpackages.com/badges/cakemanager-cakephp-settings/health.svg)](https://phpackages.com/packages/cakemanager-cakephp-settings)
```

###  Alternatives

[josegonzalez/cakephp-upload

CakePHP plugin to handle file uploading sans ridiculous automagic

5451.3M9](/packages/josegonzalez-cakephp-upload)[muffin/trash

Adds soft delete support to CakePHP ORM tables.

851.3M11](/packages/muffin-trash)[muffin/webservice

Simplistic webservices for CakePHP

88191.0k13](/packages/muffin-webservice)[admad/cakephp-sequence

Sequence plugin for CakePHP to maintain ordered list of records

46489.9k6](/packages/admad-cakephp-sequence)[riesenia/cakephp-duplicatable

CakePHP ORM plugin for duplicating entities (including related entities)

51384.5k4](/packages/riesenia-cakephp-duplicatable)[muffin/slug

Slugging support for CakePHP ORM

38264.8k5](/packages/muffin-slug)

PHPackages © 2026

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