PHPackages                             codeblanche/depend - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. codeblanche/depend

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

codeblanche/depend
==================

Less Configuration, More Injection

1.1.4(11y ago)2932[1 issues](https://github.com/CodeBlanche/Depend/issues)BSD-3-ClausePHPPHP &gt;=5.3.3

Since May 31Pushed 11y ago1 watchersCompare

[ Source](https://github.com/CodeBlanche/Depend)[ Packagist](https://packagist.org/packages/codeblanche/depend)[ RSS](/packages/codeblanche-depend/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)DependenciesVersions (13)Used By (0)

Depend
======

[](#depend)

Less Configuration, More Injection

[![Latest Stable Version](https://camo.githubusercontent.com/821d715134675b07dc26c8dd2abe44c62a91070e6ff70e9b2e9bdde7a032d38d/68747470733a2f2f706f7365722e707567782e6f72672f636f6465626c616e6368652f646570656e642f762f737461626c652e706e67)](https://packagist.org/packages/codeblanche/depend) [![Latest Unstable Version](https://camo.githubusercontent.com/246d8a63a9db07133f90053c9c1a2dcaea9cbdca7580d7baa1adba81ac284abf/68747470733a2f2f706f7365722e707567782e6f72672f636f6465626c616e6368652f646570656e642f762f756e737461626c652e706e67)](https://packagist.org/packages/codeblanche/depend) [![License](https://camo.githubusercontent.com/33ee884a88a8cca12542222a38e6325f292d6247cbcdcb3ea91909b98b534f82/68747470733a2f2f706f7365722e707567782e6f72672f636f6465626c616e6368652f646570656e642f6c6963656e73652e706e67)](https://packagist.org/packages/codeblanche/depend)

Introduction
------------

[](#introduction)

Depend attempts to make it simpler and easier for developers to take advantage of IOC by automating as much of the process as possible.

The only coding requirement is that your dependencies are clearly defined in the constructors of the classes you are writing. For example;

```
/*
 * Good
 */
class ClassA
{
    function __construct(ClassC $c, ClassD $d, ClassF $f)
    {
    }
}

/*
 * Bad
 */
class ClassA
{
    function __construct($c, $d, $f)
    {
    }
}
```

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

[](#requirements)

This project has been setup to be PHP 5.3.3 compatible and composer friendly.

Installation
------------

[](#installation)

Add `"codeblanche/entity": "1.*"` to the `require` section of your projects composer.json file.

Simplest usage possible
-----------------------

[](#simplest-usage-possible)

```
