search
Homephp教程php手册Yii2的深入学习--继承关系,yii2深入学习--

Yii2的深入学习--继承关系,yii2深入学习--

想要了解 Yii2 的话,一定要对 Yii2 中向相关类的继承关系有所了解。由于暂时读的代码有限,下面的图中只列出了部分继承关系,之后回跟着源码阅读的越来越多而增加

由上图可以看到 Yii2 中大多数类都继承自 yii\base\Object,实现了属性的功能。

yii\base\Component yii\base\Event 和 yii\base\Behavior 都继承了 yii\base\Object,yii\base\Component 是一个实现了属性/事件和行为功能的基础类,yii\base\Event 是所有事件的基础类,yii\base\Behavior 是所有行为的基础类。

Model/View 和 Controller 都从 yii\base\Component 继承而来。

 

今天比较累,偷个懒,少写一点,就这些了O(∩_∩)O

 

对 Yii2 源码有兴趣的同学可以关注项目 yii2-2.0.3-annotated,现在在上面已经添加了不少关于 Yii2 源码的注释,之后还会继续添加~

有兴趣的同学也可以参与进来,提交 Yii2 源码的注释。

 

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor