CollectionTaxonomyService.php
1 year ago
StoreTaxonomyService.php
1 year ago
TaxonomyService.php
1 year ago
TaxonomyServiceProvider.php
1 year ago
TaxonomyServiceProvider.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\WordPress\Taxonomies; |
| 4 | |
| 5 | use SureCartCore\ServiceProviders\ServiceProviderInterface; |
| 6 | |
| 7 | /** |
| 8 | * Register our form post type |
| 9 | */ |
| 10 | class TaxonomyServiceProvider implements ServiceProviderInterface { |
| 11 | /** |
| 12 | * {@inheritDoc} |
| 13 | * |
| 14 | * @param \Pimple\Container $container Service Container. |
| 15 | */ |
| 16 | public function register( $container ) { |
| 17 | $container['surecart.taxonommies.collection'] = function ( $container ) { |
| 18 | return new CollectionTaxonomyService(); |
| 19 | }; |
| 20 | |
| 21 | $container['surecart.taxonommies.store'] = function ( $container ) { |
| 22 | return new StoreTaxonomyService(); |
| 23 | }; |
| 24 | |
| 25 | $container['surecart.taxonommies'] = function ( $container ) { |
| 26 | return new TaxonomyService(); |
| 27 | }; |
| 28 | |
| 29 | $app = $container[ SURECART_APPLICATION_KEY ]; |
| 30 | $app->alias( 'taxonomies', 'surecart.taxonommies' ); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * {@inheritDoc} |
| 35 | * |
| 36 | * @param \Pimple\Container $container Service Container. |
| 37 | */ |
| 38 | public function bootstrap( $container ) { |
| 39 | $container['surecart.taxonommies.collection']->bootstrap(); |
| 40 | $container['surecart.taxonommies.store']->bootstrap(); |
| 41 | $container['surecart.taxonommies']->bootstrap(); |
| 42 | } |
| 43 | } |
| 44 |