match() public static method

Test if 2 scenario match.
public static match ( string $scenario1, string $scenario2 ) : boolean
$scenario1 string scenario name
$scenario2 string scenario name
return boolean TRUE if both scenario names match, FALSE otherwise
 /**
  * Checks if a validator is active for the workflow event passed as argument.
  *
  * @param yii\validators\Validator $validator The validator instance to test
  * @param WorklflowEvent $event The workflow event for which the validator is tested
  * @return boolean
  */
 private function _isActiveValidator($validator, $currentScenario)
 {
     foreach ($validator->on as $scenario) {
         if (WorkflowScenario::match($scenario, $currentScenario)) {
             return true;
         }
     }
     return false;
 }