forked from PHPeste/conticket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitializer.php
54 lines (47 loc) · 1.26 KB
/
initializer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Behat\Testwork\ServiceContainer\ExtensionManager;
use Behat\Testwork\ServiceContainer\Extension;
use Behat\Behat\Context\ServiceContainer\ContextExtension;
/**
* @author Jefersson Nathan <malukenho@phpse.net>
*/
class CustomExtension implements Extension
{
/**
* @return string
*/
public function getConfigKey()
{
return 'initializer';
}
/**
* @param ContainerBuilder $container
* @param array $config
*/
public function load(ContainerBuilder $container, array $config)
{
$definition = $container->register('initializer', \Feature\CustomInitializer::class);
$definition->addTag(ContextExtension::INITIALIZER_TAG);
}
/**
* @param ArrayNodeDefinition $builder
*/
public function configure(ArrayNodeDefinition $builder)
{
}
/**
* @param ExtensionManager $extensionManager
*/
public function initialize(ExtensionManager $extensionManager)
{
}
/**
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
}
}
return new CustomExtension;