src/Behat/Behat/Transformation/Transformation/PatternTransformation.php
public function transformArgument(
        RegexGenerator $regexGenerator,
        CallCenter $callCenter,
        DefinitionCall $definitionCall,
        $argumentValue
    ) {
        $regex = $regexGenerator->generateRegex(
            $definitionCall->getEnvironment()->getSuite()->getName(),
            $this->pattern,
            $definitionCall->getFeature()->getLanguage()
        );

        $this->match($regex, $argumentValue, $arguments);

        $call = new TransformationCall(
            $definitionCall->getEnvironment(),
            $definitionCall->getCallee(),
            $this,
            $arguments
        );

        $result = $callCenter->makeCall($call);

        if ($result->hasException()) {
            throw $result->getException();
        }

        return $result->getReturn();
    }
public function transformArgument(
        RegexGenerator $regexGenerator,
        CallCenter $callCenter,
        DefinitionCall $definitionCall,
        $argumentValue
    ) {
        $regex = $regexGenerator->generateRegex(
            $definitionCall->getEnvironment()->getSuite()->getName(),
            $this->pattern,
            $definitionCall->getFeature()->getLanguage()
        );

        $this->match($regex, $argumentValue, $arguments);

        $call = new TransformationCall(
            $definitionCall->getEnvironment(),
            $definitionCall->getCallee(),
            $this,
            $arguments
        );

        $result = $callCenter->makeCall($call);

        if ($result->hasException()) {
            throw $result->getException();
        }

        return $result->getReturn();
    }
public function transformArgument ( RegexGenerator $ regexGenerator , CallCenter $ callCenter , DefinitionCall $ definitionCall , $ argumentValue ) { $ regex = $ regexGenerator -> generateRegex ( $ definitionCall -> getEnvironment ( ) -> getSuite ( ) -> getName ( ) , $ this -> pattern , $ definitionCall -> getFeature ( ) -> getLanguage ( ) ) ; $ this -> match ( $ regex , $ argumentValue , $ arguments ) ; $ call = new TransformationCall ( $ definitionCall -> getEnvironment ( ) , $ definitionCall -> getCallee ( ) , $ this , $ arguments ) ; $ result = $ callCenter -> makeCall ( $ call ) ; if ( $ result -> hasException ( ) ) { throw $ result -> getException ( ) ; } return $ result -> getReturn ( ) ; }
Transforms argument value using transformation and returns a new one.

@param RegexGenerator $regexGenerator
@param CallCenter     $callCenter
@param DefinitionCall $definitionCall
@param mixed          $argumentValue

@return mixed

@throws Exception If transformation throws exception
Transforms argument value using transformation and returns a new one .