PHPackages                             milkyway-multimedia/ss-mwm-env - 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. milkyway-multimedia/ss-mwm-env

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

milkyway-multimedia/ss-mwm-env
==============================

Dot notation access of configuration, as well as overrides via $\_ENV

15.5k11PHP

Since Jun 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/milkyway-multimedia/ss-mwm-env)[ Packagist](https://packagist.org/packages/milkyway-multimedia/ss-mwm-env)[ RSS](/packages/milkyway-multimedia-ss-mwm-env/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

Env (Milkyway Multimedia)
=========================

[](#env-milkyway-multimedia)

Dot notation access of configuration, as well as overrides via $\_ENV (environment variables)

singleton('env')
----------------

[](#singletonenv)

This is the new way to access configuration. Instead of using `Config::inst()->get('Email', 'admin_email')`you can now use `singleton('env')->get('Email.admin_email')`. But that is not its real feature.

### Features

[](#features)

1. Access deep array configuration: `singleton('env')->get('Email.site_emails.staff')`
2. Override configuration using $\_ENV variables, good for when you are developing locally
3. Use configuration fallbacks: `singleton('env')->get('FacebookPage|Facebook.admin_id')`
    - Will check FacebookPage, and then check Facebook
4. Add callbacks to check in between namespaces
5. Cached

vlucas/phpdotenv
----------------

[](#vlucasphpdotenv)

For development, you can use a **.env.php** file to override variables, but it requires some manual installation.

You need to install the package: vlucas/phpdotenv via composer.json, and then follow the instructions in that package.

If you want the environment to work, you should add the following to your `ss_environment.php`:

```
   require_once BASE_PATH . '/mwm-env/code/dev/Environment.php';

```

Install
-------

[](#install)

Add the following to your composer.json file

```

    "require"          : {
		"milkyway-multimedia/ss-mwm-env": "~0.3"
	}

```

License
-------

[](#license)

- MIT

Version
-------

[](#version)

- Version 0.3 (Alpha)

Contact
-------

[](#contact)

#### Mellisa Hankins

[](#mellisa-hankins)

- E-mail:
- Twitter: [@mi3ll](https://twitter.com/mi3ll "mi3ll on twitter")
- Website: mellimade.com.au

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/873db53f59bc2f8309c506d1b56313b0c7d8c7b3160eb1700ee0754d060f9767?d=identicon)[mi3ll](/maintainers/mi3ll)

### Embed Badge

![Health badge](/badges/milkyway-multimedia-ss-mwm-env/health.svg)

```
[![Health](https://phpackages.com/badges/milkyway-multimedia-ss-mwm-env/health.svg)](https://phpackages.com/packages/milkyway-multimedia-ss-mwm-env)
```

PHPackages © 2026

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