Closed arogachev closed 7 months ago
Related - #634. Suggested by @vjik.
@vjik also suggested adding abstract class with traversal for all rules and abstract method for serializing iterated rule.
There are no use cases other than frontend. The structure needs to be adapted to the chosen frontend library anyway.
Btw it's used in yii-dev-panel
We can give the user both ways.
1) Create AbstractRulesDumper
that iterate rules and contain abstract method dumpRule(RuleInterface $rule)
. This will be easy way to create own dumper. This way for backend adpaters.
2) Keep RulesDumper
, that will work the same way as now. This way for frontend adapters.
I think it has its use case and it's good as is. I'd leave it alone.
We discussed it and decided to fix only #634 for now.
Motivation: