Search code examples
moduleyiicomponentsyii-componentsyii-extensions

Difference in between Modules and extension in Yii


I want to know what is the difference in between modules and components in Yii Framework. I have googled so much but not got any good results. So can some one will help me out to know that. Any help and suggestions will be highly appreciable.


Solution

  • Module has an MVC structure. A module is a self-contained software unit. Module is a special case of extension. An extension usually serves for a single purpose. In Yii's terms, it can be classified as follows:

    1. application component
    2. behavior
    3. widget
    4. controller
    5. action
    6. filter
    7. console command
    8. validator: a validator is a component class extending CValidator.
    9. helper: a helper is a class with only static methods. It is like global functions using the class name as their namespace.
    10. module
    11. something else