* @since 2.0 */ interface Initable { /** * Pre-initializes this component. * This method is invoked by [[\Yii::createComponent]] after its creates the new * component instance, but BEFORE the component properties are initialized. * * You may implement this method to do work such as setting property default values. */ public function preinit(); /** * Initializes this component. * This method is invoked by [[\Yii::createComponent]] after its creates the new * component instance and initializes the component properties. In other words, * at this stage, the component has been fully configured. * * The default implementation calls [[behaviors]] and registers any available behaviors. * You may override this method with additional initialization logic (e.g. establish DB connection). * Make sure you call the parent implementation. */ public function init(); }