Browse Source

更新 'thinkphp/base.php'

增加Container::getInstance()->bind(),Facade::bind(),Loader::addClassAlias()注释说明
5.1.5
蝴蝶效应 4 years ago
parent
commit
166dd48921
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      thinkphp/base.php

+ 5
- 0
thinkphp/base.php View File

@ -28,6 +28,11 @@ Loader::register();
// {}
//}
//通过 Container::getInstance()->bind() 先将核心类库实例化后注册到容器内
//再通过 Facade::bind() 将核心类转成静态代理,
//最后使用 Loader::addClassAlias() 给静态代理注册类别名,方便直接静态调用
// 注册核心类到容器
Container::getInstance()->bind([
'app' => App::class,


Loading…
Cancel
Save