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\Transformation;
13 use Behat\Behat\Definition\Call\DefinitionCall;
14 use Behat\Testwork\Call\CallCenter;
18 * Represents a simple self-contained transformation capable of changing a single argument.
20 * @author Konstantin Kudryashov <ever.zet@gmail.com>
22 interface SimpleArgumentTransformation extends Transformation
25 * Checks if transformation supports given pattern.
27 * @param string $pattern
28 * @param ReflectionMethod $method
32 static public function supportsPatternAndMethod($pattern, ReflectionMethod $method);
35 * Returns transformation priority.
39 public function getPriority();
42 * Checks if transformation supports argument.
44 * @param DefinitionCall $definitionCall
45 * @param integer|string $argumentIndex
46 * @param mixed $argumentValue
50 public function supportsDefinitionAndArgument(DefinitionCall $definitionCall, $argumentIndex, $argumentValue);
53 * Transforms argument value using transformation and returns a new one.
55 * @param CallCenter $callCenter
56 * @param DefinitionCall $definitionCall
57 * @param integer|string $argumentIndex
58 * @param mixed $argumentValue
62 public function transformArgument(CallCenter $callCenter, DefinitionCall $definitionCall, $argumentIndex, $argumentValue);