Extending YII in development is a common behavior. For example, when you write a new controller, you extend Yii by inheriting the Ccontroller class; When you write a new component, you are inheriting CWidget Or a component class that already exists. If the extension code is designed for reuse by third-party developers, we call it Extension (extension).
An extension is usually served for a single purpose. In Yii, he can be categorized as follows:
Parts of the application
Component
Controller
Action
Filter filters
Console commands
Validator: A validator is a part that inherits from the Cvalidator class.
Helper: A helper is a class that has only static methods. It resembles a global function that uses class names as namespaces.
Module: A module is a package with several classes of files and corresponding specialty files. A module is typically more advanced and has more advanced functionality than a single component. For example, we can have a module with a complete set of user management functions.
Extensions can also be parts that are not part of any of the above categories. In fact, YII is designed so carefully that almost every piece of code can be expanded and customized to suit specific needs.
Extended Series Tutorials:
Yii Framework Official Guide Series 34--extension yii: Using extensions
Yii Framework Official Guide Series 35--extension Yii: Creating an extension
Yii Framework Official Guide Series 36--extension Yii: Using third-party libraries
The above is the Yii Framework Official Guide Series 33--extension Yii: At a glance, more about topic.alibabacloud.com (www.php.cn)!