PHPackages                             emerald/container - 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. [Framework](/categories/framework)
4. /
5. emerald/container

ActiveLibrary[Framework](/categories/framework)

emerald/container
=================

Container to webapp in php

10PHP

Since Jan 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Fernando-Linhares/Emerald-Container)[ Packagist](https://packagist.org/packages/emerald/container)[ RSS](/packages/emerald-container/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Emerald Container
=================

[](#emerald-container)

### Overview

[](#overview)

Container to create dependency injection to applications. Simple Api to be used in php language, using reflection operations. Provide support to routers and more applications.

### Examples

[](#examples)

Is Able Load Any Class

```
    $container = new Container();

    $instance = $container->get(Application::class);

    $result = $instance->implemented;
    //true

```

Is Able Load Class With Class Dependencies $container = new Container();

```
    $instance = $container->get(ApplicationWithDependencies::class);

    $instance->implemented;
    //true

```

Is Able Load Class With Multi Class Dependencies

```
    $container = new Container();

    $instance = $container->get(ApplicationWithMultiDependencies::class);

    $instance->anotherAppImplemented;
    //true

    $instance->appImplemented;
    //true

```

Usable Interface On Container $container = new Container();

```
    $container->register(ApplicationInterface::class, Application::class);

    $instance = $container->get(ApplicationInterface::class);

    echo $instance->implemented;
    // true

```

Injection On Method

```
    $container = new Container();

    $instance = $container->get(ApplicationWithDependencies::class);

    echo $instance->notImplemented;
    // false

```

Injection On Method With Native Params

```
    $container = new Container();

    $instance = $container->get(ApplicationWithDependencies::class);

    echo $instance->countNum(1);
    // 1

```

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/19a947911ce740c557b0c01040950ba683998bd5525eb86e7d98090838b7c74c?d=identicon)[Fernando Linhares](/maintainers/Fernando%20Linhares)

---

Top Contributors

[![Fernando-Linhares](https://avatars.githubusercontent.com/u/73559240?v=4)](https://github.com/Fernando-Linhares "Fernando-Linhares (5 commits)")

### Embed Badge

![Health badge](/badges/emerald-container/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M299](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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