php短语的含义是什么?
我研究了Laravel框架的源代码。我达到以下命令php短语的含义是什么?,php,laravel,laravel-5.4,Php,Laravel,Laravel 5.4,我研究了Laravel框架的源代码。我达到以下命令 class Application extends Container implements ApplicationContract, HttpKernelInterface { public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true) { return $this[HttpKern
class Application extends Container implements ApplicationContract, HttpKernelInterface
{
public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true)
{
return $this[HttpKernelContract::class]->handle(Request::createFromBase($request));
}
}
因此,我需要知道$this[MyClass:class]->someMethod()短语在php语法中的含义
$this
数组吗?!怎么做
感谢类
应用程序
扩展了自身实现的容器
,因此$this[HttpKernelContract::class]
本质上调用了$this->offsetGet(HttpKernelContract::class)
,应该在容器
中实现它。$this就是这里的对象