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

ActiveLibrary

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

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

v1.0.1(5y ago)04MITPHP

Since May 28Pushed 5y 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 today

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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

2174d 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

[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

15544.9M188](/packages/laminas-laminas-validator)[shlinkio/shlink

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

4.8k4.3k](/packages/shlinkio-shlink)[laminas/laminas-mvc

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

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

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)

PHPackages © 2026

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