PHPackages                             eggbe/utilities - 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. eggbe/utilities

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

eggbe/utilities
===============

Universal utilities library

1124PHP

Since Oct 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/eggbe/utilities)[ Packagist](https://packagist.org/packages/eggbe/utilities)[ RSS](/packages/eggbe-utilities/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
------------

[](#introduction)

This is the powerful library provides the set of utilities for different needs.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.0.0
- [Able/Helpers](https://github.com/phpable/helpers)

Install
-------

[](#install)

Here's the simpler way to start using Eggbe/Utilities via [composer](http://getcomposer.org):

```
composer require eggbe/hash-store
```

Components
----------

[](#components)

- Aliaser

Usage
-----

[](#usage)

### Aliaser

[](#aliaser)

The Aliaser component provides the simple way for the class overloading by using a given list of aliases. The list of aliases have to be assigned via constructor during the object creation:

```
$Aliaser = new \Eggbe\Utilities\Aliaser([
	'Api\Reference\Units' => 'App\Models\Units',
	'Api\Reference\*' => 'App\Models\Reference',
	'Api\Model\*' => 'App\Models\&',
	'Api\Document\[Markets,Invoices,Prices]' => 'App\Document\&',
]);
```

Each rules contains of two parts. The left part of rule represents the condition and the right part represents the replacement. Both parts could include some special characters.

The first rule means what we want to overload class `Api\Reference\Units` to `App\Models\Units`. This is just the strict replacement so no any surprises here.

The second rule means what we want to overload all classes started with the parent namespace `Api\Reference\`to a single class `App\Models\Reference`.

The third rule is similar to the previous and means what we want to overload all classes started with the parent namespace `Api\Model\`to a similar class started with `App\Models\`. The amppersand character is necessary to indicate the inserting position. For example the class `Api\Model\Test` will be overloaded to `App\Models\Test`.

And the last rule means what we want to overload only three defined classes started with the parent namespace `Api\Document\`to a similar classes started with `App\Document\`. In this case the replacement statement uses the ampersand character in the same way as the previous rule.

After configuring we can use Aliaser anywhere in the code:

```
$Aliaser->alike('Api\Reference\Markets')
```

All returned values are cached so no any reason to store results in variables. Also please pay attention to the conditions order because Aliaser always returns the result of first successful comparison only.

Authors
-------

[](#authors)

Made with love at [Eggbe](http://eggbe.com).

Feedback
--------

[](#feedback)

We always welcome your feedback at .

License
-------

[](#license)

This package is released under the [MIT license](https://github.com/eggbe/utilities/blob/master/LICENSE).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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/0e7980486450f7ae6c622ae5499ed59ee231673ebf27f7f18bb204846cd9bf84?d=identicon)[eggbe](/maintainers/eggbe)

### Embed Badge

![Health badge](/badges/eggbe-utilities/health.svg)

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

###  Alternatives

[asgardcms/menu-module

Menu module for AsgardCMS. Handles all the menus.

1030.4k2](/packages/asgardcms-menu-module)

PHPackages © 2026

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