Yii2 中的 Helper 和 BaseHelper 有什么区别?

what is the difference between Helper and BaseHelper in Yii2?

想知道Yii2中Helper和BaseHelper的区别。 为什么 Yii2 中每个 Basehelper 都要从 Basehelper 扩展另一个 Helper? 我们应该在扩展助手中添加我们的修改吗?

因为使用这种结构,您可以通过创建一个扩展基本助手的新 class 来简单地自定义助手。

To customize a core helper class (e.g. yii\helpers\ArrayHelper), you should create a new class extending from the helpers corresponding base class (e.g. yii\helpers\BaseArrayHelper) and name your class the same as the corresponding concrete class (e.g. yii\helpers\ArrayHelper), including its namespace. This class will then be set up to replace the original implementation of the framework.

阅读更多:http://www.yiiframework.com/doc-2.0/guide-helper-overview.html#customizing-helper-classes