|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* TechDivision\Import\Product\Variant\DependencyInjection\ImportExtension |
|
5
|
|
|
* |
|
6
|
|
|
* NOTICE OF LICENSE |
|
7
|
|
|
* |
|
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
|
9
|
|
|
* that is available through the world-wide-web at this URL: |
|
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
|
11
|
|
|
* |
|
12
|
|
|
* PHP version 5 |
|
13
|
|
|
* |
|
14
|
|
|
* @author Tim Wagner <[email protected]> |
|
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
|
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
17
|
|
|
* @link https://github.com/techdivision/import-product-variant |
|
18
|
|
|
* @link http://www.techdivision.com |
|
19
|
|
|
*/ |
|
20
|
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Product\Variant\DependencyInjection; |
|
22
|
|
|
|
|
23
|
|
|
use Symfony\Component\Config\FileLocator; |
|
24
|
|
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
|
25
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
26
|
|
|
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* The symfony extension implementation for the M2IF import product variant library. |
|
30
|
|
|
* |
|
31
|
|
|
* @author Tim Wagner <[email protected]> |
|
32
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
|
33
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
34
|
|
|
* @link https://github.com/techdivision/import-product-variant |
|
35
|
|
|
* @link http://www.techdivision.com |
|
36
|
|
|
*/ |
|
37
|
|
|
class ImportExtension extends Extension |
|
38
|
|
|
{ |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Load's the bundles DI configuration. |
|
42
|
|
|
* |
|
43
|
|
|
* @param array $configs The array with the configuration |
|
44
|
|
|
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The container instance |
|
45
|
|
|
*/ |
|
|
|
|
|
|
46
|
|
|
public function load(array $configs, ContainerBuilder $container) |
|
47
|
|
|
{ |
|
48
|
|
|
$loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__) . '/Resources/config')); |
|
49
|
|
|
$loader->load('services.xml'); |
|
50
|
|
|
} |
|
51
|
|
|
} |
|
52
|
|
|
|