Translations
2 years ago
ErrorsService.php
3 years ago
ErrorsServiceProvider.php
3 years ago
ErrorsTranslationService.php
2 years ago
ErrorsServiceProvider.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Support\Errors; |
| 4 | |
| 5 | use SureCartCore\ServiceProviders\ServiceProviderInterface; |
| 6 | |
| 7 | class ErrorsServiceProvider implements ServiceProviderInterface { |
| 8 | /** |
| 9 | * {@inheritDoc} |
| 10 | * |
| 11 | * @param \Pimple\Container $container Service Container. |
| 12 | */ |
| 13 | public function register( $container ) { |
| 14 | $app = $container[ SURECART_APPLICATION_KEY ]; |
| 15 | |
| 16 | $container['checkout.errors_service'] = function () { |
| 17 | return new ErrorsService(); |
| 18 | }; |
| 19 | |
| 20 | $app->alias( 'errors', 'checkout.errors_service' ); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * {@inheritDoc} |
| 25 | * |
| 26 | * @param \Pimple\Container $container Service Container. |
| 27 | */ |
| 28 | public function bootstrap( $container ) { |
| 29 | // Nothing to bootstrap. |
| 30 | } |
| 31 | } |
| 32 |