use of com.nvlad.yii2support.utils.Yii2SupportSettings in project yii2support by nvlad.
the class ViewUtil method getPatterns.
@NotNull
private static Map<Pattern, String> getPatterns(Project project) {
Map<Pattern, String> patterns = projectViewPatterns.get(project);
if (patterns == null) {
patterns = new LinkedHashMap<>();
Yii2SupportSettings settings = Yii2SupportSettings.getInstance(project);
for (Map.Entry<String, String> entry : settings.viewPathMap.entrySet()) {
String patternString = "^(" + entry.getKey().replace("*", "([\\w-]+)") + ").+";
Pattern pattern = Pattern.compile(patternString);
patterns.put(pattern, entry.getValue());
}
projectViewPatterns.put(project, patterns);
}
return patterns;
}
Aggregations