PHPackages                             rock-symphony/container - 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. rock-symphony/container

ActiveLibrary[Framework](/categories/framework)

rock-symphony/container
=======================

An indie Service Container implementation based on Laravel Container

3.1.0(8y ago)2286MITPHPPHP ^5.4|^7.0

Since Mar 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rock-symphony/container)[ Packagist](https://packagist.org/packages/rock-symphony/container)[ RSS](/packages/rock-symphony-container/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (2)Versions (16)Used By (0)

RockSymphony Service Container
==============================

[](#rocksymphony-service-container)

[![Build Status](https://camo.githubusercontent.com/b6aac23eb7f6714a3901948cb3cd9e320dbb230214af389307545e3180df394c/68747470733a2f2f7472617669732d63692e6f72672f726f636b2d73796d70686f6e792f636f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rock-symphony/container) [![StyleCI](https://camo.githubusercontent.com/159776875615d9db5cb1d104241711689f2e5796d9cb8223ca0da9ad7a322d73/68747470733a2f2f7374796c6563692e696f2f7265706f732f38343538333038332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/84583083)

An indie Service Container implementation based on Laravel Container.

### Philosophy

[](#philosophy)

- Based on Laravel Container (has most of features of [illuminate/container](https://laravel.com/docs/5.3/container) 5.3)
- [PSR Container](https://github.com/container-interop/fig-standards/blob/master/proposed/container.md) compatibility
- [Semantic Versioning](http://semver.org/)
- One dependency (psr/container interface)

### Features

[](#features)

- PHP 5.4+, PHP 7.0+
- Automatic dependencies resolution
- Dependency-injecting constructor calls
- Dependency-injecting method calls

Usage
-----

[](#usage)

### Installation

[](#installation)

Use [composer](http://getcomposer.org/).

```
composer require rock-symphony/container:^2.0
```

### Basics

[](#basics)

Of course you can put services to container (`->set()`) and get them from it (`->get()`), as well as check if container has specific service (`->has()`).

```
