<commit_before># Aura.Di

## Instantiation

We instantiate a _Container_ like so:

```php
<?php
use Aura\Di\ContainerBuilder;
$builder = new ContainerBuilder();<commit_msg>add to docs<commit_after># Aura.Di

The Aura.Di package provides a dependency injection container system with the
following features:

- constructor and setter injection

- explicit and implicit auto-resolution of typehinted constructor parameter values

- configuration of setters across interfaces and traits

- inheritance of constructor parameter and setter method values

- lazy-loaded services, values, and instances

- instance factories

Fully describing the nature and benefits of dependency injection, while
desirable, is beyond the scope of this document. For more information about
"inversion of control" and "dependency injection" please consult
<http://martinfowler.com/articles/injection.html> by <NAME>.

Finally, please note that this package is intended for use as a **dependency injection** system, not as a **service locator** system. If you use it as a service locator, that's bad, and you should feel bad.

**WARNING:** This 3.x package is still under heavy development. Use at your own risk. You may wish to review the 2.x package for a stable version.

## Instantiation

We instantiate a _Container_ like so:

```php
<?php
use Aura\Di\ContainerBuilder;
$builder = new ContainerBuilder();
{'fraction_non_alphanumeric': 0.07086044830079537, 'fraction_numerical': 0.0014461315979754157, 'mean_word_length': 4.9655172413793105, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6384590', 'n_tokens_mistral': 370, 'n_tokens_neox': 348, 'n_words': 176}