11# Using Pimple
22
3- [ Pimple] ( http://pimple.sensiolabs.org/ ) is a widely used code-driven dependency
4- injection container provided as a standalone component by SensioLabs. It
5- features:
3+ [ Pimple] ( http://pimple.sensiolabs.org/ ) is a widely used, code-driven,
4+ dependency injection container provided as a standalone component by SensioLabs.
5+ It features:
66
77- combined parameter and service storage.
88- ability to define factories for specific classes.
@@ -13,18 +13,18 @@ Pimple only supports programmatic creation at this time.
1313## Installing and configuring Pimple
1414
1515Pimple implements [ PSR-11 Container] ( https://github.com/php-fig/container )
16- as of version 3.2. To use Pimple as dependency injection container we
17- recommend using [ zendframework/zend-pimple-config] ( https://github.com/zendframework/zend-pimple-config )
16+ as of version 3.2. To use Pimple as a dependency injection container, we
17+ recommend using [ zendframework/zend-pimple-config] ( https://github.com/zendframework/zend-pimple-config ) ,
1818which helps you to configure the PSR-11 container. First install the package:
1919
2020``` bash
2121$ composer require zendframework/zend-pimple-config
2222```
2323
24- Then to configure Pimple use the following script
25- (we'll have that in ` config/container.php ` ):
24+ Now, create the file ` config/container.php ` with the following contents:
2625
2726``` php
27+ <?php
2828use Zend\Pimple\Config\Config;
2929use Zend\Pimple\Config\ContainerFactory;
3030
@@ -34,8 +34,8 @@ $factory = new ContainerFactory();
3434return $factory(new Config($config));
3535```
3636
37- For more information please see
38- [ documentation of zend-pimple-config] ( https://github.com/zendframework/zend-pimple-config/blob/master/README.md ) .
37+ For more information, please see the
38+ [ zend-pimple-config documentation ] ( https://github.com/zendframework/zend-pimple-config/blob/master/README.md ) .
3939
4040Your bootstrap (typically ` public/index.php ` ) will then look like this:
4141
0 commit comments