VERSION
VERSION = '6.0.3'
App 基础类
$route : \think\Route
$config : \think\Config
$cache : \think\Cache
$request : \think\Request
$http : \think\Http
$console : \think\Console
$env : \think\Env
$event : \think\Event
$middleware : \think\Middleware
$log : \think\Log
$lang : \think\Lang
$db : \think\Db
$cookie : \think\Cookie
$session : \think\Session
$validate : \think\Validate
$filesystem : \think\Filesystem
$instance : \think\Container|\Closure
容器对象实例
$instances : array
容器中的对象实例
$bind : array
容器绑定标识
$invokeCallback : array
容器回调
$appDebug : bool
应用调试模式
$beginTime : float
应用开始时间
$beginMem : int
应用内存初始占用
$namespace : string
当前应用类库命名空间
$rootPath : string
应用根目录
$thinkPath : string
框架目录
$appPath : string
应用目录
$runtimePath : string
Runtime目录
$routePath : string
路由定义目录
$configExt : string
配置后缀
$initializers : array
应用初始化器
$services : array
注册的系统服务
$initialized : bool
初始化
__set(mixed $name, mixed $value) : mixed
| mixed | $name | |
| mixed | $value |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
offsetSet(mixed $key, mixed $value) : mixed
| mixed | $key | |
| mixed | $value |
| None found |
| None found |
| None found |
| None found |
__construct(string $rootPath = '') : mixed
架构方法
| string | $rootPath | 应用根目录 |
| None found |
register(\think\Service|string $service, bool $force = false) : \think\Service|null
注册服务
| \think\Service|string | $service | 服务 |
| bool | $force | 强制重新注册 |
| None found |
bootService(\think\Service $service) : mixed
执行服务
| \think\Service | $service | 服务 |
| None found |
getService(string|\think\Service $service) : \think\Service|null
获取服务
| string|\think\Service | $service |
| None found |
| None found |
| None found |
setNamespace(string $namespace) : $this
设置应用命名空间
| string | $namespace | 应用命名空间 |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
parseClass(string $layer, string $name) : string
解析应用类的类名
| string | $layer | 层名 controller model ... |
| string | $name | 类名 |
| None found |
| None found |
invokeAfter(string $class, object $object) : void
执行invokeClass回调
| string | $class | 对象类名 |
| object | $object | 容器对象实例 |
| None found |
bindParams(\ReflectionFunctionAbstract $reflect, array $vars = []) : array
绑定参数
| \ReflectionFunctionAbstract | $reflect | 反射类 |
| array | $vars | 参数 |
| None found |
getObjectParam(string $className, array $vars) : mixed
获取对象类型的参数值
| string | $className | 类名 |
| array | $vars | 参数 |
| None found |
| None found |
| None found |
| None found |