Yii Framework official guide series 33-extended Yii: overview

Source: Internet
Author: User
Extending Yii during 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 an existing component...



Extending Yii during 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 an existing component class. if the extended code is designed for reuse by third-party developers, we call itExtension).

An extension is usually used for a single purpose. in Yii, it can be classified as follows:

  • Application components

  • Components

  • Controller

  • Action

  • Filter

  • Console commands

  • Checker: The Checker is a part inherited from the CValidator class.

  • Helper: a helper is a class with only static methods. it is similar to using a class name as a global function of the namespace.

  • Module: a module contains several class files and corresponding special files. A module is generally more advanced and provides more advanced functions than a single component. for example, we can have a complete set of user management functions.

Extension can also be a component that does not belong to any of the above categories. in fact, Yii is designed with caution so that almost every segment of its code can be extended and customized to suit specific needs.

Extension Series tutorial:

Yii Framework official guide series 34-extended Yii: use extended

Yii Framework official guide series 35-extension Yii: Create extension

Yii Framework Official Guide Series 36-extended Yii: using third-party libraries

The above is the Yii Framework official guide series 33-extended Yii: overview content. For more information, see PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.