PHPackages                             edwinhoksberg/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. edwinhoksberg/settings

ActiveLibrary

edwinhoksberg/settings
======================

1.0.1(9y ago)019MITPHPPHP &gt;= 7.0.0

Since Jul 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/EdwinHoksberg/Settings)[ Packagist](https://packagist.org/packages/edwinhoksberg/settings)[ RSS](/packages/edwinhoksberg-settings/feed)WikiDiscussions master Synced 2mo ago

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

Settings
========

[](#settings)

A very simple library for managing application settings with the so-called dot notation. Mostly used by my personal projects.

[![Travis](https://camo.githubusercontent.com/2347fada9d879492689fd325ec659680ba3fd619cf532d1283b9dde3949ee615/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f456477696e486f6b73626572672f53657474696e67732e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://travis-ci.org/EdwinHoksberg/Settings) [![Coveralls](https://camo.githubusercontent.com/232b35f87e02f7f934b66f8d398dd6a0fab01986a06fbf6bfa64594f856d9252/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f456477696e486f6b73626572672f53657474696e67732e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://coveralls.io/github/EdwinHoksberg/Settings)

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

[](#installation)

#### With composer

[](#with-composer)

Execute this command in your terminal:

```
composer require edwinhoksberg/settings

```

Or add this line to your composer.json `require` section:

```
"edwinhoksberg/settings": "~1.0"
```

And run `composer update`

#### Without composer

[](#without-composer)

Just require the `Settings.php` file in your project:

```
require 'src/Settings.php';
```

How to use
----------

[](#how-to-use)

```
// settings.php should just be a return statement with an array.
// See tests/fixtures/settings.php for an example.
Settings::loadFromFile('settings.php');

// Load from an array
Settings::loadFromArray([ 'settings' => ... ]);

// Get a setting value using dot notation
Settings::get('database.username', 'defaultuser');

// Retrieve the entire settings array
Settings::getAll();

// You can also set/replace settings with dot notation
Settings::set('database.password', 'toor');

// Check if a setting value exists
Settings::has('database.password'); // Returns true or false

// Remove all settings
Settings::clear();
```

Tests
-----

[](#tests)

The test files are located in the `tests` directory, and can be run with phpunit:

```
phpunit -c phpunit.dist.xml

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3594d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e4d5803cd09a66d49af984103219fa0fededf18e34b1dc488905e8eed337395?d=identicon)[EdwinHoksberg](/maintainers/EdwinHoksberg)

---

Top Contributors

[![EdwinHoksberg](https://avatars.githubusercontent.com/u/6866019?v=4)](https://github.com/EdwinHoksberg "EdwinHoksberg (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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