PHPackages                             esase/tiny-service-manager - 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. [Framework](/categories/framework)
4. /
5. esase/tiny-service-manager

ActiveLibrary[Framework](/categories/framework)

esase/tiny-service-manager
==========================

The Service Manager is a service/object locator, tasked with retrieving other objects

v1.0.3(5y ago)1130MITPHPPHP ^7.4 || ^8.0

Since Aug 6Pushed 5y ago2 watchersCompare

[ Source](https://github.com/esase/tiny-service-manager)[ Packagist](https://packagist.org/packages/esase/tiny-service-manager)[ RSS](/packages/esase-tiny-service-manager/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

tiny-service-manager
====================

[](#tiny-service-manager)

[![Build Status](https://camo.githubusercontent.com/4b2fc48f6fd8c9b5ecc124a5614ee4f94b3073e9450d5c8ad81e99077c13bae8/68747470733a2f2f7472617669732d63692e636f6d2f65736173652f74696e792d736572766963652d6d616e616765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/github/esase/tiny-service-manager/builds)[![Coverage Status](https://camo.githubusercontent.com/05de3050443444f461246c0215a8b63d324d00a9d538575c15b41fd6796402a5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f65736173652f74696e792d736572766963652d6d616e616765722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/esase/tiny-service-manager?branch=master)

**Tiny/Service Manager** - it's a very simple realization of [DI](https://en.wikipedia.org/wiki/Dependency_injection) (dependency injection) container with a clean and understandable Api. (There are no any extra dependencies and it's very small).

`DI containers` are essential part of any modern `framework` or `CMS`. Differently speaking it's the one of the most important part in web applications, which stores and produces any kind of services for you (`controllers`, `services`, `utilities`, etc).

Furthermore it follows to a one of the [SOLID](https://en.wikipedia.org/wiki/SOLID). principle (dependency injection or dependency inversion). Which stands for - you should not create objects directly in other objects, because of some difficulties in unit testing and maintaining of embedded classes. Lets check a look a couple of examples:

**a wrong way:**

```
