yiisoft / strings

String helper methods and an inflector
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
47 stars 16 forks source link

Optimize Inflector #108

Open xepozz opened 1 year ago

xepozz commented 1 year ago

We have introduced https://github.com/yiisoft/strings/blob/master/src/CombinedRegexp.php that helps with a loop of regexps. There are some places to apply CombinedRegexp:

vjik commented 1 year ago

User can override rules via withSingularizeRules() and withPluralizeRules() methods, and use regular expressions with different flags. It is do not allow us use CombinedRegexp here.

xepozz commented 1 year ago

I didn't get you

vjik commented 1 year ago

I didn't get you

CombinedRegexp uses same flags for all expressions, but inflector allow use expressions with different flags.