@@ -40,8 +40,7 @@ class ActionObject
40
40
const ACTION_ATTRIBUTE_URL = 'url ' ;
41
41
const ACTION_ATTRIBUTE_SELECTOR = 'selector ' ;
42
42
const ACTION_ATTRIBUTE_VARIABLE_REGEX_PARAMETER = '/\(.+\)/ ' ;
43
- const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN = '/{{[\w]+\.?[\w\[\]]+}}/ ' ;
44
- const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN_WITH_PARAMS = '/{{[\w]+\.[\w]+\(.+\)}}/ ' ;
43
+ const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN = '/({{[\w]+\.?[\w\[\]]+}})|({{[\w]+\.[\w]+\(.+\)}})/ ' ;
45
44
46
45
/**
47
46
* The unique identifier for the action
@@ -444,7 +443,7 @@ private function stripAndReturnParameters($reference)
444
443
private function findAndReplaceReferences ($ objectHandler , $ inputString )
445
444
{
446
445
//look for parameter area, if so use different regex
447
- $ regex = $ this -> resolveRegexPatternForReference ( $ inputString ) ;
446
+ $ regex = ActionObject:: ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN ;
448
447
449
448
preg_match_all ($ regex , $ inputString , $ matches );
450
449
@@ -514,20 +513,6 @@ private function validateUrlAreaAgainstActionType($obj)
514
513
}
515
514
}
516
515
517
- /**
518
- * Determines whether the given $inputString has (params), and returns the appropriate regex for use in matching.
519
- * @param string $inputString
520
- * @return string
521
- */
522
- private function resolveRegexPatternForReference ($ inputString )
523
- {
524
- if (preg_match (ActionObject::ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN_WITH_PARAMS , $ inputString ) === 1 ) {
525
- return ActionObject::ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN_WITH_PARAMS ;
526
- } else {
527
- return ActionObject::ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN ;
528
- }
529
- }
530
-
531
516
/**
532
517
* Gets the object's dataByName with given $match, differentiating behavior between <array> and <data> nodes.
533
518
* @param string $obj
0 commit comments