PHPackages                             wpsyntex/polylang-di - 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. wpsyntex/polylang-di

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

wpsyntex/polylang-di
====================

Dependency Injection Container by Polylang.

0252PHP

Since Apr 11Pushed 4y ago2 watchersCompare

[ Source](https://github.com/polylang/polylang-di)[ Packagist](https://packagist.org/packages/wpsyntex/polylang-di)[ RSS](/packages/wpsyntex-polylang-di/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Polylang DI
===========

[](#polylang-di)

[![php](https://camo.githubusercontent.com/48cc059aa957c3fe55f2af9a5669515ed6fb2c680ed71f86888242ef6a925386/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f777073796e7465782f706f6c796c616e672d6469)](https://camo.githubusercontent.com/48cc059aa957c3fe55f2af9a5669515ed6fb2c680ed71f86888242ef6a925386/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f777073796e7465782f706f6c796c616e672d6469)[![Latest Version](https://camo.githubusercontent.com/1399feeaf0278d9c75b3f696196e59e734b180103c17a9cddb3fa79aefd3408c/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f777073796e7465782f706f6c796c616e672d64692f6c6174657374)](https://packagist.org/packages/wpsyntex/polylang-di)[![Software License](https://camo.githubusercontent.com/bf879ca74845e2412e9286413bd6a1a9142dbe29800bfedbed89c98852252f16/68747470733a2f2f62616467656e2e6e65742f6769746875622f6c6963656e73652f706f6c796c616e672f706f6c796c616e672d6469)](LICENSE.md)

Dependency Injection Container by WP Syntex (Polylang).

This package is compliant with [PSR-4](https://www.php-fig.org/psr/psr-4/) and [PSR-11](https://www.php-fig.org/psr/psr-11/).
However, PSR-11's interfaces are not implemented, to prevent conflicts with other plugins and themes that may use a different version of them.

This project is pretty much a fork of an old version of [league/container](https://github.com/thephpleague/container), that has been reworked a bit to keep only the features that we need in our projects.

Install
-------

[](#install)

Via Composer

```
composer require wpsyntex/polylang-di
```

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

[](#requirements)

This package supports php 5.6+.

Documentation
-------------

[](#documentation)

### Create and retrieve shared and not shared instances

[](#create-and-retrieve-shared-and-not-shared-instances)

```
