Browse code

Change configuration and define defaults

Benjamin Roth authored on18/10/2024 11:55:26
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-<?php
2
-
3
-declare(strict_types=1);
4
-
5
-/*
6
- * This file is part of vonRotenberg Shopware API Bundle.
7
- *
8
- * (c) vonRotenberg
9
- *
10
- * @license proprietary
11
- */
12
-
13
-namespace vonRotenberg\ShopwareApiBundle\DependencyInjection;
14
-
15
-use Symfony\Component\Config\FileLocator;
16
-use Symfony\Component\DependencyInjection\ContainerBuilder;
17
-use Symfony\Component\DependencyInjection\Extension\Extension;
18
-use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
19
-
20
-class VonrotenbergShopwareApiExtension extends Extension
21
-{
22
-    public function load(array $configs, ContainerBuilder $container): void
23
-    {
24
-        $config = $this->processConfiguration(new Configuration(), $configs);
25
-
26
-        foreach($config['credentials'] as $key=>$val)
27
-        {
28
-            $container->setParameter('shopware_api.credentials.'.$key,$val);
29
-        }
30
-
31
-        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
32
-        $loader->load('services.yml');
33
-    }
34
-}
Browse code

Add API endpoint config

Benjamin Roth authored on18/10/2024 11:38:20
Showing1 changed files
... ...
@@ -21,6 +21,13 @@ class VonrotenbergShopwareApiExtension extends Extension
21 21
 {
22 22
     public function load(array $configs, ContainerBuilder $container): void
23 23
     {
24
+        $config = $this->processConfiguration(new Configuration(), $configs);
25
+
26
+        foreach($config['credentials'] as $key=>$val)
27
+        {
28
+            $container->setParameter('shopware_api.credentials.'.$key,$val);
29
+        }
30
+
24 31
         $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
25 32
         $loader->load('services.yml');
26 33
     }
Browse code

Initial commit

Benjamin Roth authored on18/10/2024 10:47:52
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
+
5
+/*
6
+ * This file is part of vonRotenberg Shopware API Bundle.
7
+ *
8
+ * (c) vonRotenberg
9
+ *
10
+ * @license proprietary
11
+ */
12
+
13
+namespace vonRotenberg\ShopwareApiBundle\DependencyInjection;
14
+
15
+use Symfony\Component\Config\FileLocator;
16
+use Symfony\Component\DependencyInjection\ContainerBuilder;
17
+use Symfony\Component\DependencyInjection\Extension\Extension;
18
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
19
+
20
+class VonrotenbergShopwareApiExtension extends Extension
21
+{
22
+    public function load(array $configs, ContainerBuilder $container): void
23
+    {
24
+        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
25
+        $loader->load('services.yml');
26
+    }
27
+}