thinkphp源码无差别阅读(十二)
framework阅读
think/event/AppInit.php
think/event/HttpEnd.php
think/event/HttpEnd.php
think/event/LogRecord.php
- 属性:type、message
- 构造方法:__construct
think/event/LogWrite.php
- 属性:channel、log
- 构造方法:__construct
think/event/RouteLoaded.php
- 构造方法:__construct
think/exception/ClassNotFoundException.php
- 属性:class
- 构造方法:__construct、getClass
think/exception/ErrorException.php
- 属性:severity
- 构造方法:__construct
- 获取错误级别:getSeverity
think/exception/FailException.php
- 获取错误级别:getSeverity
think/exception/FuncNotFoundException.php
- 属性:func
- 构造方法:__construct
- 获取方法名:getFunc
think/exception/Handle.php
- 属性:app、ignoreReport、isJson
- 构造方法:__construct
- 上报或者记录异常:report
- 是否忽略:isIgnoreReport
- 渲染异常:render
- 渲染异常renderForConsole
- 渲染http异常:renderHttpException
- 收集异常数据:convertExceptionToArray
- 收集异常数据:convertExceptionToResponse
- 渲染异常:renderExceptionContent
- 获取报错编码:getCode
- 获取报错信息:getMessage
- 读取出错文件内容:getSourceCode
- 获取异常扩展数据:getExtendData
- 获取常量:getConst
think/exception/HttpException.php
- 属性:statusCode、headers
- 构造方法:__construct
- 获取状态码:getStatusCode
- 获取header:getHeaders
think/exception/HttpResponseException.php
- 属性:response
- 构造方法:__construct
- 获取响应:getResponse
think/exception/InvalidArgumentException.php
think/exception/RouteNotFoundException.php
think/exception/ValidateException.php
- 属性:error
- 构造方法:__construct
- 获取验证错误信息:getError
计划阅读
[ ] framework源码
[ ] orm源码
[ ] helper源码
留言
点击留言