Skip to content

Commit 5aa263b

Browse files
#2 Update directory structure with code on /src
1 parent d7e7490 commit 5aa263b

File tree

13 files changed

+46
-28
lines changed

13 files changed

+46
-28
lines changed

DependencyInjection/CleverAgeSoapProcessExtension.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
],
3535
"autoload": {
3636
"psr-4": {
37-
"CleverAge\\SoapProcessBundle\\": ""
37+
"CleverAge\\SoapProcessBundle\\": "src/"
3838
}
3939
},
4040
"autoload-dev": {
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php declare(strict_types=1);
2+
/**
3+
* This file is part of the CleverAge/SoapProcessBundle package.
4+
*
5+
* Copyright (C) 2017-2019 Clever-Age
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
11+
namespace CleverAge\SoapProcessBundle\DependencyInjection;
12+
13+
use Sidus\BaseBundle\DependencyInjection\SidusBaseExtension;
14+
use Symfony\Component\Config\FileLocator;
15+
use Symfony\Component\DependencyInjection\ContainerBuilder;
16+
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
17+
use Symfony\Component\Finder\Finder;
18+
19+
/**
20+
* This is the class that loads and manages your bundle configuration.
21+
*
22+
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
23+
*/
24+
class CleverAgeSoapProcessExtension extends SidusBaseExtension
25+
{
26+
public function load(array $configs, ContainerBuilder $container): void
27+
{
28+
$this->findServices($container, __DIR__.'/../Resources/config/services');
29+
}
30+
31+
/**
32+
* Recursively import config files into container.
33+
*/
34+
protected function findServices(ContainerBuilder $container, string $path, string $extension = 'yaml'): void
35+
{
36+
$finder = new Finder();
37+
$finder->in($path)
38+
->name('*.'.$extension)->files();
39+
$loader = new YamlFileLoader($container, new FileLocator($path));
40+
foreach ($finder as $file) {
41+
$loader->load($file->getFilename());
42+
}
43+
}
44+
}
File renamed without changes.
File renamed without changes.

Transformer/RequestTransformer.php renamed to src/Transformer/RequestTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
namespace CleverAge\SoapProcessBundle\Transformer;
1212

13-
use CleverAge\SoapProcessBundle\Registry\ClientRegistry;
1413
use CleverAge\ProcessBundle\Transformer\ConfigurableTransformerInterface;
14+
use CleverAge\SoapProcessBundle\Registry\ClientRegistry;
1515
use Symfony\Component\OptionsResolver\OptionsResolver;
1616

1717
/**

0 commit comments

Comments
 (0)