PHPackages                             jakesutherland/nomad-helpers - 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. jakesutherland/nomad-helpers

ActiveLibrary

jakesutherland/nomad-helpers
============================

A WordPress PHP Composer package that provides helper functions and utilities that are used in other Nomad Composer Packages.

1.2.0(4y ago)0282MITPHP

Since Aug 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jakesutherland/nomad-helpers)[ Packagist](https://packagist.org/packages/jakesutherland/nomad-helpers)[ Docs](https://jakesutherland.com)[ RSS](/packages/jakesutherland-nomad-helpers/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (5)Used By (2)

Nomad Helpers
=============

[](#nomad-helpers)

A WordPress PHP Composer package that provides helper functions and utilities that are used in other Nomad Composer Packages.

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

[](#installation)

You can install Nomad Helpers in your project by using composer.

```
$ composer require jakesutherland/nomad-helpers

```

Documentation
-------------

[](#documentation)

Majority of the Nomad Helpers functions and utilities provided are fairly self explanatory and already well documented within the code-base.

Only the important stuff that you need to worry about is below.

### Nomad Environment

[](#nomad-environment)

The `NOMAD_ENV` constant is used to determine the type of environment that your WordPress installation is running on. This should be defined in your `wp-config.php` file.

Possible values: `development` `staging` `production`

Default value: `production`

If you are building out your project locally on your computer, you'll want to configure your environment for development:

```
define( 'NOMAD_ENV', 'development' );

```

If you are testing your website in a staging environment:

```
define( 'NOMAD_ENV', 'staging' );

```

If your website is live, configure your environment for production:

```
define( 'NOMAD_ENV', 'production' );

```

It is highly recommended that you never have a live production website set to `development`.

### Nomad Debugging

[](#nomad-debugging)

The `NOMAD_DEBUG` constant is used to show additional debugging information when in a `development` environment. This should also be defined in your `wp-config.php` file.

```
define( 'NOMAD_DEBUG', true );

```

### Nomad Errors

[](#nomad-errors)

While working on your project in a development environment, you may come across a Nomad Error. The purpose for Nomad Errors is to help steer you in the right direction when developing with Nomad features and utilities.

Nomad Errors will stop all processing and display error messages when `NOMAD_ENV` is set to `development`.

If `NOMAD_ENV` is set to `staging` or `production` then Nomad Errors will not be displayed.

IMPORTANT: If `NOMAD_ENV` is NOT defined and is NOT set to `development` you will not see any Nomad Error messages! The assumption is that, by default, you're on a production environment.

### Nomad Exceptions

[](#nomad-exceptions)

Much different than Nomad Errors, Nomad Exceptions happen when the code cannot recover from itself and the application needs to stop processing. Something is broken.

Nomad Exceptions will be displayed regardless of your `NOMAD_ENV` setting.

### Register Nomad Package &amp; Plugin

[](#register-nomad-package--plugin)

The `register_nomad_package()` and `register_nomad_plugin()` functions register a Nomad Package or Plugin in the global scope. This way the system knows which Nomad Packages or Plugins are available and being used. It passes in the path that its installed to help determine where the specific package is being loaded. This is important because every Nomad Plugin likely utilizes multiple Nomad Packages as dependencies, and each Nomad Package may also have its own dependencies.

Every Nomad Package is developed in such a way that it will only load once, no matter how many instances may be installed across other various Nomad Plugins or Packages.

Changelog
---------

[](#changelog)

### 1.2.0

[](#120)

- Added `register_nomad_package()` and `register_nomad_plugin()` functions.
- Added `Nomad_Constants` class that contains various constants.
- Updated `Nomad_Exception` class filename to be prefixed with `class-`.
- Updated changelog version number formatting.
- Fixed `nomad_format_attributes()` when an attribute is a boolean and its value is false, the key should not be added to the list of attributes.
- Removed `type` property from `composer.json` file.

### 1.1.0

[](#110)

- Updated constants (package is called Nomad Helpers, not Nomad Helper).
- Updated constants commenting to include context and version number it was added.
- Updated `nomad_error()` function comments to provide more context of expectations.
- Added `NOMAD_ENV` documentation to `README.md`.
- Added `NOMAD_HELPERS_SRC_PATH` constant.
- Added `NOMAD_DEBUG` constant (default `false`).
- Added `NOMAD_DEBUG` documentation to `README.md`.
- Added `Nomad_Exception` class.
- Added `Nomad_Exception` documentation to `README.md`.
- Added `nomad_error()` documentation to `README.md`.
- Added `nomad_array_keys_exist()` function.
- Added `nomad_array_keys_missing()` function.
- Added Changelog to `README.md`.

### 1.0.0

[](#100)

- Initial Release

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/jakesutherland/nomad-helpers/blob/master/LICENSE) for more information.

Copyright
---------

[](#copyright)

Copyright (c) 2021 Jake Sutherland

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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 ~8 days

Total

3

Last Release

1719d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b7bf4457b073efca54fa9ca85f7a09a427747b2f154005cb0e1251e01fa88ff?d=identicon)[jakesutherland](/maintainers/jakesutherland)

---

Top Contributors

[![jakesutherland](https://avatars.githubusercontent.com/u/44877032?v=4)](https://github.com/jakesutherland "jakesutherland (28 commits)")

### Embed Badge

![Health badge](/badges/jakesutherland-nomad-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/jakesutherland-nomad-helpers/health.svg)](https://phpackages.com/packages/jakesutherland-nomad-helpers)
```

PHPackages © 2026

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