laravel5.5源码阅读草稿——入口
在laravel把系统基础核心初始化完毕后,便通过application 的 make 方法,传入了http核心的类名来获取别名(在container类的aliases属性中,存储了众多类名与别名的键值对,似乎是通过类名到别名,再到实例的方式来获取的,数组见下方)
container->aliases
=
array:64 [▼
"Illuminate\Foundation\Application" => "app"
"Illuminate\Contracts\Container\Container" => "app"
"Illuminate\Contracts\Foundation\Application" => "app"
"Psr\Container\ContainerInterface" => "app"
"Illuminate\Auth\AuthManager" => "auth"
"Illuminate\Contracts\Auth\Factory" => "auth"
"Illuminate\Contracts\Auth\Guard" => "auth.driver"
"Illuminate\View\Compilers\BladeCompiler" => "blade.compiler"
"Illuminate\Cache\CacheManager" => "cache"
"Illuminate\Contracts\Cache\Factory" => "cache"
"Illuminate\Cache\Repository" => "cache.store"
"Illuminate\Contracts\Cache\Repository" => "cache.store"
"Illuminate\Config\Repository" => "config"
"Illuminate\Contracts\Config\Repository" => "config"
"Illuminate\Cookie\CookieJar" => "cookie"
"Illuminate\Contracts\Cookie\Factory" => "cookie"
"Illuminate\Contracts\Cookie\QueueingFactory" => "cookie"
"Illuminate\Encryption\Encrypter" => "encrypter"
"Illuminate\Contracts\Encryption\Encrypter" => "encrypter"
"Illuminate\Database\DatabaseManager" => "db"
"Illuminate\Database\Connection" => "db.connection"
"Illuminate\Database\ConnectionInterface" => "db.connection"
"Illuminate\Events\Dispatcher" => "events"
"Illuminate\Contracts\Events\Dispatcher" => "events"
"Illuminate\Filesystem\Filesystem" => "files"
"Illuminate\Filesystem\FilesystemManager" => "filesystem"
"Illuminate\Contracts\Filesystem\Factory" => "filesystem"
"Illuminate\Contracts\Filesystem\Filesystem" => "filesystem.disk"
"Illuminate\Contracts\Filesystem\Cloud" => "filesystem.cloud"
"Illuminate\Contracts\Hashing\Hasher" => "hash"
"Illuminate\Translation\Translator" => "translator"
"Illuminate\Contracts\Translation\Translator" => "translator"
"Illuminate\Log\Writer" => "log"
"Illuminate\Contracts\Logging\Log" => "log"
"Psr\Log\LoggerInterface" => "log"
"Illuminate\Mail\Mailer" => "mailer"
"Illuminate\Contracts\Mail\Mailer" => "mailer"
"Illuminate\Contracts\Mail\MailQueue" => "mailer"
"Illuminate\Auth\Passwords\PasswordBrokerManager" => "auth.password"
"Illuminate\Contracts\Auth\PasswordBrokerFactory" => "auth.password"
"Illuminate\Auth\Passwords\PasswordBroker" => "auth.password.broker"
"Illuminate\Contracts\Auth\PasswordBroker" => "auth.password.broker"
"Illuminate\Queue\QueueManager" => "queue"
"Illuminate\Contracts\Queue\Factory" => "queue"
"Illuminate\Contracts\Queue\Monitor" => "queue"
"Illuminate\Contracts\Queue\Queue" => "queue.connection"
"Illuminate\Queue\Failed\FailedJobProviderInterface" => "queue.failer"
"Illuminate\Routing\Redirector" => "redirect"
"Illuminate\Redis\RedisManager" => "redis"
"Illuminate\Contracts\Redis\Factory" => "redis"
"Illuminate\Http\Request" => "request"
"Symfony\Component\HttpFoundation\Request" => "request"
"Illuminate\Routing\Router" => "router"
"Illuminate\Contracts\Routing\Registrar" => "router"
"Illuminate\Contracts\Routing\BindingRegistrar" => "router"
"Illuminate\Session\SessionManager" => "session"
"Illuminate\Session\Store" => "session.store"
"Illuminate\Contracts\Session\Session" => "session.store"
"Illuminate\Routing\UrlGenerator" => "url"
"Illuminate\Contracts\Routing\UrlGenerator" => "url"
"Illuminate\Validation\Factory" => "validator"
"Illuminate\Contracts\Validation\Factory" => "validator"
"Illuminate\View\Factory" => "view"
"Illuminate\Contracts\View\Factory" => "view"
]
$bootstrappers = [
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
'Illuminate\Foundation\Bootstrap\ConfigureLogging',
'Illuminate\Foundation\Bootstrap\HandleExceptions',
'Illuminate\Foundation\Bootstrap\RegisterFacades',
'Illuminate\Foundation\Bootstrap\RegisterProviders',
'Illuminate\Foundation\Bootstrap\BootProviders',
];
laravel5.5源码阅读草稿——入口的更多相关文章
- laravel5.5源码阅读草稿——路由
laravel 里的路由是由RouteServiceProvider提供的,其中的boot方法为启动项,调用了父类的boot方法. RouteServiceProvider中的boot方法设置了自己与 ...
- laravel5.5源码阅读草稿——application
构建方法传入整个项目根目录路径(public文件夹上一级)将其设为基础路径(存在本类basePath属性中). __construct > setBasePath > bindPathsI ...
- CI框架源码阅读笔记2 一切的入口 index.php
上一节(CI框架源码阅读笔记1 - 环境准备.基本术语和框架流程)中,我们提到了CI框架的基本流程,这里再次贴出流程图,以备参考: 作为CI框架的入口文件,源码阅读,自然由此开始.在源码阅读的过程中, ...
- CI框架源码阅读笔记4 引导文件CodeIgniter.php
到了这里,终于进入CI框架的核心了.既然是“引导”文件,那么就是对用户的请求.参数等做相应的导向,让用户请求和数据流按照正确的线路各就各位.例如,用户的请求url: http://you.host.c ...
- CI框架源码阅读笔记3 全局函数Common.php
从本篇开始,将深入CI框架的内部,一步步去探索这个框架的实现.结构和设计. Common.php文件定义了一系列的全局函数(一般来说,全局函数具有最高的加载优先权,因此大多数的框架中BootStrap ...
- CI框架源码阅读笔记1 - 环境准备、基本术语和框架流程
最开始使用CI框架的时候,就打算写一个CI源码阅读的笔记系列,可惜虎头蛇尾,一直没有行动.最近项目少,总算是有了一些时间去写一些东西.于是准备将之前的一些笔记和经验记录下来,一方面权作备忘,另一方面时 ...
- Spring源码阅读系列总结
最近一段时间,粗略的查看了一下Spring源码,对Spring的两大核心和Spring的组件有了更深入的了解.同时在学习Spring源码时,得了解一些设计模式,不然阅读源码还是有一定难度的,所以一些重 ...
- 39 网络相关函数(七)——live555源码阅读(四)网络
39 网络相关函数(七)——live555源码阅读(四)网络 39 网络相关函数(七)——live555源码阅读(四)网络 简介 14)readSocket从套接口读取数据 recv/recvfrom ...
- 转-OpenJDK源码阅读导航跟编译
OpenJDK源码阅读导航 OpenJDK源码阅读导航 博客分类: Virtual Machine HotSpot VM Java OpenJDK openjdk 这是链接帖.主体内容都在各链接中. ...
随机推荐
- drag与drop事件
为了支持网页上一些元素的拖动效果,可以使用drag和drog事件. 目前ie 5.0+, firefox 3.5+等都支持这些事件,ECMA Script第5版正式将其纳入标准. 对于被拖动的元素来说 ...
- js 获取 网页屏幕高度 窗口高度 元素高度 滚动高度
常用: JS 获取浏览器窗口大小 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // 获取窗口宽度 if (window.innerWidth) winWidth = ...
- vim的visual模式
在可视化模式下,可以对一个文本块的整体进行操作.例如,首先高亮选中一部分文本,然后用d命令删除这个文本块.可视化模式的好处在于,你可以在做改动之前,就看到操作将影响的文本.可视化模式可以分为以下三种: ...
- 基于NFS实现多WEB服务器负载均衡
实现环境: 实现原理: 共四台服务器 A,B,C,D 服务器A (CentOS 6.7): IP地址: 192.168.3.67 角色: DNS服务 说明: 为两台web服务器做域名轮询 服务器B,C ...
- g++: error: unrecognized command line option ‘-std=C++11’
一个小程序,在编译的时候出错,原来使用的编译命令是 g++ -std=C++11 array.cpp -o array.exe g++: error: unrecognized command lin ...
- July 04th 2017 Week 27th Tuesday
Nothing is really beautiful but truth. 只有真理才是真美. Truth can be beautiful, but it also can be cruel. W ...
- 如何在Windows中安装GitHub
1.使用Git 在Git官网下载Git安装包,双击开始安装即可.安装完毕之后,在Windows中会具有一个Git Bash命令行工具以及一个Git GUI客户端工具. 点击Download即可下载. ...
- Radmin自动连接 c#版 带源码
实现原理:1.利用radminview 自带命令 2.大漠绑定插件. 附图: 源码下载:http://files.cnblogs.com/eastday/Radmin%E8%87%AA%E5%8A%A ...
- 51nod 1832 先序遍历与后序遍历【二叉树+高精度】
题目链接:51nod 1832 先序遍历与后序遍历 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 对于给定的一个二叉树的先序遍历和后序遍历,输出有多少种满足条件的 ...
- hdu-2886 Special Prime---数论推导
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2866 题目大意: 问你1到L中有多少个素数满足n^3 + p*n^2 = m^3(其中n,m为大于1 ...