一、index.php
----------> 引入 vendor/autoload.php
autoload.php
-----------> 引入 composer/autoload_real.php
-----------> 执行ComposerAutoloaderInit0e536330980f48c953a804969af94e4d::getLoader()
autoload_real.php
------------> getLoader
------------> 单例
------------> spl_autoload_register(array('ComposerAutoloaderInit0e536330980f48c953a804969af94e4d', 'loadClassLoader'), true, true);
------------> 注册函数loadClassLoader作为__autoload 的实现
------------> self::$loader = new \Composer\Autoload\ClassLoader();
------------> 引入 \Composer\Autoload\ClassLoader
------------> 引入 autoload_namespaces.php 给作为属性 $loader
------------> $vendorDir $baseDir //( autoload_namespaces.php)
------------> 引入 autoload_psr4.php 作为属性给 $loader
------------> $loader->register(true);
------------> spl_autoload_register(array($this, 'loadClass'), true, $prepend); //(ClassLoader.php)
------------> loadClass ----> findFile
------------> 引入 autoload_files.php require
------------> return $loader
二、index.php
------------> 初始化了一个$loader (暂时不知道什么用)
------------> 引入 /vendor/yiisoft/yii2/Yii.php
Yii.php
------------> 引入 BaseYii.php ,Yii 继承 BaseYii
------------> spl_autoload_register(['Yii', 'autoload'], true, true);
------------> Yii::$classMap = require __DIR__ . '/classes.php'; //引入一堆php class地址
------------> Yii::$container = new yii\di\Container();//容器
//继承关系梳理
yii\di\Container(容器) -> yii\base\Component(实现 属性,事件,行为 功能的基类) -> yii\base\BaseObject(实现 属性 功能的基类,含有__construct)
yii\web\Application(所有web应用类的基类) -> \yii\base\Application(所有应用的基类,__construct) -> yii\base\Module(所有模块和应用的基类,含有__construct) -> yii\di\ServiceLocator(服务定位器,包含所有模块和应用) -> yii\base\Component -> yii\base\BaseObject
三、index.php