1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Container;
12:
13: use Autarky\Provider;
14:
15: /**
16: * Provides the application with a container.
17: *
18: * This service provider is vital to the framework.
19: */
20: class ContainerProvider extends Provider
21: {
22: /**
23: * {@inheritdoc}
24: */
25: public function register()
26: {
27: $this->app->setContainer($dic = new Container);
28: $dic->instance('Autarky\Application', $this->app);
29: }
30: }
31: