PHPackages                             kopikode/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. kopikode/container

ActiveLibrary

kopikode/container
==================

An array container for simplification usability

1.1.0(10y ago)121MITPHPPHP &gt;=5.3.0

Since Mar 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/somy/Container)[ Packagist](https://packagist.org/packages/kopikode/container)[ RSS](/packages/kopikode-container/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

KopiKode Container
==================

[](#kopikode-container)

[![Build Status](https://camo.githubusercontent.com/d429daeea5ed023eaee064c7acaf1d03f77f20250ec211a6809c48022dad8cdd/68747470733a2f2f7472617669732d63692e6f72672f736f6d792f436f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/somy/Container)

A PHP array container for simplification usability

Requirement
-----------

[](#requirement)

You need **PHP &gt;= 5.3.0**.

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

[](#installation)

Add requirements to your composer json files

```
 "require": {
    "kopikode/container": "dev-master"
}

```

Manual
------

[](#manual)

PHP Native array access

```
// Set
$arr = array();
$arr['user']['administrator'] = 'Somy A';

// Get
$admin = $arr['user']['administrator];

```

Container Access

```
// Initiate
$container = new \KopiKode\Container;

// Set
$container['user.administrator] = 'Somy A';

// Get
$admin = $container['user.administrator'];

```

Nested Access (get upper level )

```
$users = $container['user'];

```

will reproduce

```
array (
    'administrator' => 'Somy A'
)

```

### Service / Callable Dependency Injection ( added on v.1.1.0 )

[](#service--callable-dependency-injection--added-on-v110-)

With Service Dependency Injection, you can store callable which return same Instance of callable. Default parameters always container it self

```
$container = new \KopiKode\Container;
$container['session'] = function ($c) {
    return new SomeSessionServices();
};

$container['session']->sessionMethod();

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Every ~629 days

Total

2

Last Release

3802d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f11a67fcbf4499e52ef3a9c6f8da3e0be6f00ce92a903e88cbf6af5c328b6c6?d=identicon)[somy](/maintainers/somy)

![](https://www.gravatar.com/avatar/4528000b7b9d83c83d37585a339e433ddcfbb8586ca0dd46508b10ae348ef2fc?d=identicon)[kopikode](/maintainers/kopikode)

---

Top Contributors

[![somy](https://avatars.githubusercontent.com/u/336899?v=4)](https://github.com/somy "somy (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laminas/laminas-mvc

Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins

17224.4M365](/packages/laminas-laminas-mvc)[laminas/laminas-mvc-i18n

Integration between laminas-mvc and laminas-i18n

144.5M44](/packages/laminas-laminas-mvc-i18n)[chadicus/slim-oauth2-middleware

OAuth2 middleware for use within a Slim Framework API

48411.9k1](/packages/chadicus-slim-oauth2-middleware)[mouf/pimple-interop

This project is a very simple extension to the Pimple microframework. It adds to Pimple compatibility with the container-interop APIs.

102.4M2](/packages/mouf-pimple-interop)[enlitepro/enlite-monolog

Monolog integration to Laminas

18641.6k](/packages/enlitepro-enlite-monolog)[maglnet/magl-markdown

Provides a ZF2 View Helper to render markdown syntax. It uses third-party libraries for the rendering and you can switch between different renderers.

22178.2k4](/packages/maglnet-magl-markdown)

PHPackages © 2026

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