移动互联网时代,时间碎片化更加严重,比如排队的几分钟,等车的间隙,等人的间隙,这都是可以利用的碎片化时间。

那么,有2个占据这些时间的方式:短视频,所以抖音起来了;5分钟一局的游戏,比如斗地主。

但这种5分钟一局的游戏,除了斗地主就没别的了么?思考一下。

还有5分钟的小音频什么的,podcast channel?

当然了,短视频什么的,才是真·时间黑洞。

Behaviors

Behaviors are instances of yii\base\Behavior, or of a child class. Behaviors, also known as mixins, allow you to enhance the functionality of an existing component class without needing to change the class's inheritance. Attaching a behavior to a component "injects" the behavior's methods and properties into the component, making those methods and properties accessible as if they were defined in the component class itself.
Moreover, a behavior can respond to the events triggered by the component, which allows behaviors to also customize the normal code execution of the component.

这两段话,是Yii2官网上对Bahaviors的定义。先尝试着理解第一段话。

-- 阅读剩余部分 --