PHPackages                             gavinggordon/predefiner - 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. gavinggordon/predefiner

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

gavinggordon/predefiner
=======================

A simple package to quickly and dynamically set PHP constants.

1.0.0(10y ago)16081MITPHP

Since Apr 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gavinggordon/predefiner)[ Packagist](https://packagist.org/packages/gavinggordon/predefiner)[ Docs](http://predefiner.gavingordon.com)[ RSS](/packages/gavinggordon-predefiner/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Predefiner
==========

[](#predefiner)

[![Build Status](https://camo.githubusercontent.com/510f481a5acdae0ae2a94dff4d6969828b92194b8b9b71390ba7f49acc89a4b8/68747470733a2f2f7472617669732d63692e6f72672f676176696e67676f72646f6e2f707265646566696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gavinggordon/predefiner)[![Packagist Version](https://camo.githubusercontent.com/893060da2c01b82d998b8f06e6dd07023adb6590369376a21b4d3dee3ef55262/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676176696e67676f72646f6e2f707265646566696e65722e737667)](https://packagist.com/gavinggordon/predefiner)[![Github Release](https://camo.githubusercontent.com/b26bf909ba4a2701c266030f7aa270e5450ef0d311b2e7530efe54e088e6286d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f676176696e67676f72646f6e2f707265646566696e65722e737667)](https://github.com/gavinggordon/predefiner/master)[![Usage License](https://camo.githubusercontent.com/8febdaf128e0c9ef98fc3e6c34443e760efe6e39fb4b854c2da504190ac08a3c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f676176696e67676f72646f6e2f707265646566696e65722e737667)](https://github.com/gavinggordon/predefiner/blob/master/LICENSE.txt)

Description
-----------

[](#description)

This class (GGG\\Config\\Predefiner) is a simple package to quickly and dynamically set PHP constants.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
	composer require gavinggordon/predefiner

```

### Examples

[](#examples)

#### Instantiation:

[](#instantiation)

```
	include_once( __DIR__ . '/vendor/autoload.php' );

	$predefiner = new \GGG\Config\Predefiner();
```

#### Setting:

[](#setting)

```
	$predefiner->set( ['API_KEY' => 'abc123def456hij789klm0'] );
```

#### Initializing:

[](#initializing)

```
	$predefiner->init();

	echo API_KEY;
	// Result: 'abc123def456hij789klm0';
```

#### Issues

[](#issues)

If you have any issues at all, please post your findings in the issues page at .

#### License

[](#license)

This package utilizes the MIT License.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

3727d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7691513?v=4)[Gavin G Gordon](/maintainers/gavinggordon)[@gavinggordon](https://github.com/gavinggordon)

---

Top Contributors

[![gavinggordon](https://avatars.githubusercontent.com/u/7691513?v=4)](https://github.com/gavinggordon "gavinggordon (32 commits)")

---

Tags

phpenvironmentsettingconstantssetuppredefined

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gavinggordon-predefiner/health.svg)

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

PHPackages © 2026

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