PHPackages                             injector/injector - 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. injector/injector

ActiveLibrary[Framework](/categories/framework)

injector/injector
=================

A dependency injection class based on Pimple

4.0(11y ago)3811BSD 2-ClausePHP

Since Jul 2Pushed 11y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (2)Versions (8)Used By (1)

Injector
========

[](#injector)

A dependency injection class based on Pimple 3

[![Build Status](https://camo.githubusercontent.com/b926099a786b89abbc369a64a6abab81af8addfdbd9daa9c7d2e4f8112ccc13d/68747470733a2f2f7472617669732d63692e6f72672f656d617068702f496e6a6563746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/emaphp/Injector)

**Author**: Emmanuel Antico
**Last Modification**: 2014/10/14
**Version**: 4.0

Installation ------------
Installation is made via composer. Add the following lines to the composer.json file in your project.
\*\*Composer\*\* ```
{
    "require": {
		"injector/injector": "4.0.*"
	}
}
```

Dependencies ------------
Injector requires the following packages to be installed: - [Pimple 3](https://github.com/fabpot/Pimple)
- [Omocha 1.1](https://github.com/emaphp/omocha)

How to use ------------
Injector is a dependency injection library that uses the \*Pimple\\Container\* class to initialize a set of properties within an instance. This is done by adding the appropiate annotations to the class declaration.
&gt;Step 1: Create a Provider A provider is a class that implements the *Pimple\\ServiceProviderInterface* interface. This class sets a number of services (and parameters) inside a container.

```
