4 * This file is part of the Behat.
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\Behat\Context\Argument;
13 use Behat\Testwork\Suite\Suite;
16 * Composite factory. Delegates to other (registered) factories to do the job.
18 * @see ContextEnvironmentHandler
20 * @author Konstantin Kudryashov <ever.zet@gmail.com>
22 * @deprecated and will be removed in 4.0. Use CompositeArgumentResolverFactory instead
24 final class CompositeFactory implements SuiteScopedResolverFactory
27 * @var SuiteScopedResolverFactory[]
29 private $factories = array();
34 * @param SuiteScopedResolverFactory $factory
36 public function registerFactory(SuiteScopedResolverFactory $factory)
38 $this->factories[] = $factory;
44 public function generateArgumentResolvers(Suite $suite)
48 function (array $resolvers, SuiteScopedResolverFactory $factory) use ($suite) {
49 return array_merge($resolvers, $factory->generateArgumentResolvers($suite));