@@ 37-75 (lines=39) @@ | ||
34 | * @link https://github.com/techdivision/import |
|
35 | * @link http://www.techdivision.com |
|
36 | */ |
|
37 | class AdditionalAttributeCsvSerializerFactory implements SerializerFactoryInterface |
|
38 | { |
|
39 | ||
40 | /** |
|
41 | * The DI container instance. |
|
42 | * |
|
43 | * @var \Symfony\Component\DependencyInjection\ContainerInterface |
|
44 | */ |
|
45 | protected $container; |
|
46 | ||
47 | /** |
|
48 | * Initialize the factory with the DI container instance. |
|
49 | * |
|
50 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container The DI container instance |
|
51 | */ |
|
52 | public function __construct(ContainerInterface $container) |
|
53 | { |
|
54 | $this->container = $container; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Creates and returns the serializer instance. |
|
59 | * |
|
60 | * @param \TechDivision\Import\Serializer\Configuration\SerializerConfigurationInterface $serializerConfiguration The serializer configuration |
|
61 | * |
|
62 | * @return \TechDivision\Import\Serializer\ConfigurationAwareSerializerInterface The serializer instance |
|
63 | */ |
|
64 | public function createSerializer(SerializerConfigurationInterface $serializerConfiguration) |
|
65 | { |
|
66 | ||
67 | // load the serializer instance from the container and pass the configuration |
|
68 | /** @var \TechDivision\Import\Serializer\ConfigurationAwareSerializerInterface $serializer */ |
|
69 | $serializer = $this->container->get(DependencyInjectionKeys::IMPORT_SERIALIZER_CSV_ADDITIONAL_ATTRIBUTE); |
|
70 | $serializer->init($serializerConfiguration); |
|
71 | ||
72 | // return the serializer instance |
|
73 | return $serializer; |
|
74 | } |
|
75 | } |
|
76 |
@@ 37-75 (lines=39) @@ | ||
34 | * @link https://github.com/techdivision/import |
|
35 | * @link http://www.techdivision.com |
|
36 | */ |
|
37 | class CategoryCsvSerializerFactory implements SerializerFactoryInterface |
|
38 | { |
|
39 | ||
40 | /** |
|
41 | * The DI container instance. |
|
42 | * |
|
43 | * @var \Symfony\Component\DependencyInjection\ContainerInterface |
|
44 | */ |
|
45 | protected $container; |
|
46 | ||
47 | /** |
|
48 | * Initialize the factory with the DI container instance. |
|
49 | * |
|
50 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container The DI container instance |
|
51 | */ |
|
52 | public function __construct(ContainerInterface $container) |
|
53 | { |
|
54 | $this->container = $container; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Creates and returns the serializer instance. |
|
59 | * |
|
60 | * @param \TechDivision\Import\Serializer\Configuration\SerializerConfigurationInterface $serializerConfiguration The serializer configuration |
|
61 | * |
|
62 | * @return \TechDivision\Import\Serializer\ConfigurationAwareSerializerInterface The serializer instance |
|
63 | */ |
|
64 | public function createSerializer(SerializerConfigurationInterface $serializerConfiguration) |
|
65 | { |
|
66 | ||
67 | // load the serializer instance from the container and pass the configuration |
|
68 | /** @var \TechDivision\Import\Serializer\SerializerInterface $serializer */ |
|
69 | $serializer = $this->container->get(DependencyInjectionKeys::IMPORT_SERIALIZER_CSV_CATEGORY); |
|
70 | $serializer->init($serializerConfiguration); |
|
71 | ||
72 | // return the serializer instance |
|
73 | return $serializer; |
|
74 | } |
|
75 | } |
|
76 |
@@ 37-75 (lines=39) @@ | ||
34 | * @link https://github.com/techdivision/import |
|
35 | * @link http://www.techdivision.com |
|
36 | */ |
|
37 | class ProductCategoryCsvSerializerFactory implements SerializerFactoryInterface |
|
38 | { |
|
39 | ||
40 | /** |
|
41 | * The DI container instance. |
|
42 | * |
|
43 | * @var \Symfony\Component\DependencyInjection\ContainerInterface |
|
44 | */ |
|
45 | protected $container; |
|
46 | ||
47 | /** |
|
48 | * Initialize the factory with the DI container instance. |
|
49 | * |
|
50 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container The DI container instance |
|
51 | */ |
|
52 | public function __construct(ContainerInterface $container) |
|
53 | { |
|
54 | $this->container = $container; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Creates and returns the serializer instance. |
|
59 | * |
|
60 | * @param \TechDivision\Import\Serializer\Configuration\SerializerConfigurationInterface $serializerConfiguration The serializer configuration |
|
61 | * |
|
62 | * @return \TechDivision\Import\Serializer\ConfigurationAwareSerializerInterface The serializer instance |
|
63 | */ |
|
64 | public function createSerializer(SerializerConfigurationInterface $serializerConfiguration) |
|
65 | { |
|
66 | ||
67 | // load the serializer instance from the container and pass the configuration |
|
68 | /** @var \TechDivision\Import\Serializer\SerializerInterface $serializer */ |
|
69 | $serializer = $this->container->get(DependencyInjectionKeys::IMPORT_SERIALIZER_CSV_PRODUCT_CATEGORY); |
|
70 | $serializer->init($serializerConfiguration); |
|
71 | ||
72 | // return the serializer instance |
|
73 | return $serializer; |
|
74 | } |
|
75 | } |
|
76 |
@@ 37-75 (lines=39) @@ | ||
34 | * @link https://github.com/techdivision/import |
|
35 | * @link http://www.techdivision.com |
|
36 | */ |
|
37 | class ValueCsvSerializerFactory implements SerializerFactoryInterface |
|
38 | { |
|
39 | ||
40 | /** |
|
41 | * The DI container instance. |
|
42 | * |
|
43 | * @var \Symfony\Component\DependencyInjection\ContainerInterface |
|
44 | */ |
|
45 | protected $container; |
|
46 | ||
47 | /** |
|
48 | * Initialize the factory with the DI container instance. |
|
49 | * |
|
50 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container The DI container instance |
|
51 | */ |
|
52 | public function __construct(ContainerInterface $container) |
|
53 | { |
|
54 | $this->container = $container; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Creates and returns the serializer instance. |
|
59 | * |
|
60 | * @param \TechDivision\Import\Serializer\Configuration\SerializerConfigurationInterface $serializerConfiguration The serializer configuration |
|
61 | * |
|
62 | * @return \TechDivision\Import\Serializer\ConfigurationAwareSerializerInterface The serializer instance |
|
63 | */ |
|
64 | public function createSerializer(SerializerConfigurationInterface $serializerConfiguration) |
|
65 | { |
|
66 | ||
67 | // load the serializer instance from the container and pass the configuration |
|
68 | /** @var \TechDivision\Import\Serializer\SerializerInterface $serializer */ |
|
69 | $serializer = $this->container->get(DependencyInjectionKeys::IMPORT_SERIALIZER_CSV_VALUE); |
|
70 | $serializer->init($serializerConfiguration); |
|
71 | ||
72 | // return the serializer instance |
|
73 | return $serializer; |
|
74 | } |
|
75 | } |
|
76 |