Yii Framework Official Guide Series 33--extension Yii: overview

Source: Internet
Author: User
Tags yii



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)!

  • 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.