SvgServiceProvider.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Svg; |
| 4 | |
| 5 | use SureCartCore\ServiceProviders\ServiceProviderInterface; |
| 6 | |
| 7 | /** |
| 8 | * Provide Svg dependencies. |
| 9 | * |
| 10 | * @codeCoverageIgnore |
| 11 | */ |
| 12 | class SvgServiceProvider implements ServiceProviderInterface { |
| 13 | /** |
| 14 | * {@inheritDoc} |
| 15 | */ |
| 16 | public function register( $container ) { |
| 17 | // Service for registering |
| 18 | $container['surecart.svg'] = function () { |
| 19 | return new Svg(); |
| 20 | }; |
| 21 | |
| 22 | $app = $container[ SURECART_APPLICATION_KEY ]; |
| 23 | $app->alias( 'svg', 'surecart.svg' ); |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * {@inheritDoc} |
| 28 | */ |
| 29 | public function bootstrap( $container ) { |
| 30 | // Nothing to bootstrap. |
| 31 | } |
| 32 | } |
| 33 |