1 | <?php |
||
12 | class SpawnerExtension implements ExtensionInterface |
||
13 | { |
||
14 | const SPAWNER_ID = 'spawner'; |
||
15 | |||
16 | /** @var array Default options for configuration */ |
||
17 | private $defaultOptions = array( |
||
18 | 'commands' => array(), |
||
19 | 'work_dir' => '.', |
||
20 | 'win_prefix' => '', |
||
21 | 'nix_prefix' => 'exec', |
||
22 | 'sleep' => 0, |
||
23 | ); |
||
24 | |||
25 | /** |
||
26 | * Loads a specific configuration. |
||
27 | * |
||
28 | * @param ContainerBuilder $container ContainerBuilder instance |
||
29 | * @param array $config Extension configuration hash (from behat.yml) |
||
30 | */ |
||
31 | public function load(ContainerBuilder $container, array $config) |
||
43 | |||
44 | /** |
||
45 | * You can modify the container here before it is dumped to PHP code. |
||
46 | * |
||
47 | * @param ContainerBuilder $container |
||
48 | * |
||
49 | * @api |
||
50 | */ |
||
51 | public function process(ContainerBuilder $container) |
||
54 | |||
55 | /** |
||
56 | * Returns the extension config key. |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getConfigKey() |
||
64 | |||
65 | /** |
||
66 | * Initializes other extensions. |
||
67 | * |
||
68 | * This method is called immediately after all extensions are activated but |
||
69 | * before any extension `configure()` method is called. This allows extensions |
||
70 | * to hook into the configuration of other extensions providing such an |
||
71 | * extension point. |
||
72 | * |
||
73 | * @param ExtensionManager $extensionManager |
||
74 | */ |
||
75 | public function initialize(ExtensionManager $extensionManager) |
||
78 | |||
79 | /** |
||
80 | * Setups configuration for the extension. |
||
81 | * |
||
82 | * @param ArrayNodeDefinition $builder |
||
83 | */ |
||
84 | public function configure(ArrayNodeDefinition $builder) |
||
104 | |||
105 | /** |
||
106 | * Loads main suite listener |
||
107 | * |
||
108 | * @param ContainerBuilder $container |
||
109 | */ |
||
110 | private function loadSuiteListener(ContainerBuilder $container) |
||
125 | } |
||
126 |