<div id="autowiring" class='container'>

    <h2><a href="#autowiring">Autowiring</a></h2>

    <div class="row">

        <div class="col-md-8 col-md-offset-2">

            <p>
                Type-hint your constructor parameters and the container can guess which dependencies to inject.
            </p>

<pre><code class="php">class Foo
{
    private $bar;

    public function __construct(Bar $bar)
    {
        $this->bar = $bar;
    }
}</code></pre>

            <p>
                Covers 80% of the use cases with 0 configuration.
            </p>

        </div>

    </div>

    <p class="text-center">
        <a href="doc/autowiring.html" class="btn btn-default" title="Learn more about dependency injection autowiring">Learn more</a>
    </p>

</div>
