4 * This file is part of the Behat Testwork.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Testwork\ServiceContainer;
13 use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
14 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15 use Symfony\Component\DependencyInjection\ContainerBuilder;
18 * Represents Testwork extension mechanism.
20 * Extensions are the core entities in Testwork. Almost all framework functionality in Testwork and its different
21 * implementations is provided through extensions.
23 * @author Konstantin Kudryashov <ever.zet@gmail.com>
25 interface Extension extends CompilerPassInterface
28 * Returns the extension config key.
32 public function getConfigKey();
35 * Initializes other extensions.
37 * This method is called immediately after all extensions are activated but
38 * before any extension `configure()` method is called. This allows extensions
39 * to hook into the configuration of other extensions providing such an
42 * @param ExtensionManager $extensionManager
44 public function initialize(ExtensionManager $extensionManager);
47 * Setups configuration for the extension.
49 * @param ArrayNodeDefinition $builder
51 public function configure(ArrayNodeDefinition $builder);
54 * Loads extension services into temporary container.
56 * @param ContainerBuilder $container
57 * @param array $config
59 public function load(ContainerBuilder $container, array $config);