PHPackages                             gidato/laminas-container-extensions - 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. gidato/laminas-container-extensions

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

gidato/laminas-container-extensions
===================================

Extensions Laminas Service Manager to implement Container Extensions (eg nested containers, cached instances with options)

v1.0.1(6y ago)04MITPHPCI failing

Since May 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/gidato/laminas-container-extensions)[ Packagist](https://packagist.org/packages/gidato/laminas-container-extensions)[ Docs](https://github.com/gidato/laminas-container-extensions)[ RSS](/packages/gidato-laminas-container-extensions/feed)WikiDiscussions master Synced 3w ago

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

Gidato / Laminas-Container-Extensions
=====================================

[](#gidato--laminas-container-extensions)

```

composer require gidato/laminas-container-extensions

```

You then need to find the following line in \\config\\container.php

```
use Laminas\ServiceManager\ServiceManager;

```

And change it as follows:

```
use Gidato\ContainerExtensions\Laminas;

```

#### Nested Containers

[](#nested-containers)

A separate container can be created and used within a container, effectively namespacing the bound elements.

This allows specific parts of the application to be directly associated with a specific container.

To access sub containers, you can use `$container->container("name-of-container")`, and then bind things to this level.

#### Cached Objects Which Use Options To Build

[](#cached-objects-which-use-options-to-build)

Rather than using `$container->get('name')`, you can use `$container->getWith('name', ['options'])`. This will create the object using the options passed, but will return exactly the same instance on subsequent request with the same options providing the object is defined as shared, or the default is shared.

#### Getting New Instances

[](#getting-new-instances)

Rather than using `build()`, you should use `create()` and `createWith()` to allow the package to be used with other container implementations.

#### Getting Everything From A Container

[](#getting-everything-from-a-container)

You can get all keys within a container, or all instances.

```
public function getKeys(bool $includeContainer = false, bool $includeAliases = false);

$container->getKeys(); // returns all keys, but excludes containers and aliases
$container->getKeys(true); // returns all keys including containers, but excludes aliases
$container->getKeys(false, true); // returns all keys including aliases but excludes containers
$container->getKeys(true, true); // returns all keys including containers and aliases

```

Or get all instances (index by the key). These will be built if not already.

```
public function getAll(bool $includeContainer = false);

$container->getAll(); // returns all instances, but excludes containers
$container->getAll(true); // returns all instances, and includes containers

```

License
-------

[](#license)

This software is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Unknown

Total

1

Last Release

2226d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c5dc6acc412b19ac41e2c8050e22a822c5fe1a08818ca2b7de097cdba628465?d=identicon)[gidato](/maintainers/gidato)

---

Top Contributors

[![gidato](https://avatars.githubusercontent.com/u/57621561?v=4)](https://github.com/gidato "gidato (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gidato-laminas-container-extensions/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k5.2k](/packages/shlinkio-shlink)[laminas/laminas-session

Object-oriented interface to PHP sessions and storage

8524.2M131](/packages/laminas-laminas-session)[rwoverdijk/assetmanager

An assetmanager module for Laminas.

2142.1M49](/packages/rwoverdijk-assetmanager)[laminas/laminas-paginator

Paginate collections of data from arbitrary sources

246.1M97](/packages/laminas-laminas-paginator)[oat-sa/generis

TAO generis library

10148.8k122](/packages/oat-sa-generis)[neilime/twbs-helper-module

Laminas (formerly Zend Framework) module for easy integration of Twitter Bootstrap

21106.1k](/packages/neilime-twbs-helper-module)

PHPackages © 2026

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