
thinkphp6
LCRxxoo
为了积分
展开
-
THINKPHP6 实现中间件
/** * 执行应用程序 * @param Request $request * @return mixed */ protected function runWithRequest(Request $request) { $this->initialize(); // 加载全局中间件 $this->loadMiddleware(); //...原创 2020-03-13 12:58:13 · 4100 阅读 · 3 评论 -
TP6 依赖注入
public function invokeClass(string $class, array $vars = []) { try { //根据反射机制获取 类的内部信息(多少个私有属性,多少个共有属性等等) $reflect = new ReflectionClass($class); } catch (ReflectionException $...原创 2020-03-12 12:07:23 · 990 阅读 · 0 评论