yii\base\Component
2018-02-21 本文已影响0人
duandaoke
Component is the base class that implements the property, event and behavior features.
Event is a way to "inject" custom code into existing code at certain places.For example, a comment object can trigger an "add" event when the user adds a comment. We can write custom code and attach it to this event so that when the event is triggered (i.e. comment will be added), our custom code will be executed.
An event is identified by a name that should be unique within the class it is defined at. Event names are case-sensitive.