PHPackages                             oxidprojects/dependency-injection - 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. oxidprojects/dependency-injection

ActiveAdd-on[Utility &amp; Helpers](/categories/utility)

oxidprojects/dependency-injection
=================================

The missing dependency injection for OXID eShop

0.1.4(3y ago)01.7k[1 issues](https://github.com/OXIDprojects/dependency-injection/issues)1GPL-3.0-or-laterPHP

Since Jan 27Pushed 3y ago8 watchersCompare

[ Source](https://github.com/OXIDprojects/dependency-injection)[ Packagist](https://packagist.org/packages/oxidprojects/dependency-injection)[ RSS](/packages/oxidprojects-dependency-injection/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (7)Versions (5)Used By (1)

Dependency Injection
====================

[](#dependency-injection)

[![Build Status](https://camo.githubusercontent.com/78f7227b181ff0f69f48c578088a352aa4d9f76d8a6b116fdc287348a1a4dfbc/68747470733a2f2f7472617669732d63692e6f72672f4f58494470726f6a656374732f646570656e64656e63792d696e6a656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/OXIDprojects/dependency-injection)[![Coverage Status](https://camo.githubusercontent.com/915f6be4b9332e6a3e7d4c62d0ecc896dfb3d4c667c62388e1483b5df47eae93/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4f58494470726f6a656374732f646570656e64656e63792d696e6a656374696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/OXIDprojects/dependency-injection?branch=master)

The missing dependency injection for OXID eShop

- [Blog (DE)](https://oxidforge.org/de/dependency-injection-fuer-oxid-eshop.html)
- [Issues](https://github.com/OXIDprojects/dependency-injection/issues)

Install
-------

[](#install)

```
composer require "oxidprojects/dependency-injection"

```

How to use:
-----------

[](#how-to-use)

1. Create `services.yaml` in a module: (eg. `source/modules/tm/Sunshine/services.yaml`)

    ```
    services:
      tm\ModuleOutput:
        class: 'tm\ModuleOutput'
    ```
2. `project_container()` is a global function.

    ```
