php短语是什么意思?

时间:2017-08-26 17:45:22

标签: 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[HttpKernelContract::class]->handle(Request::createFromBase($request));
    }


}

所以,我需要知道php语法中 $ this [MyClass:class] - > someMethod()短语的含义。

$this数组吗?!怎么样?

由于

1 个答案:

答案 0 :(得分:3)

课程Application扩展了Container$this[HttpKernelContract::class]本身实现ArrayAccess,因此$this->offsetGet(HttpKernelContract::class)基本上会调用Container { "question": "Is this useful", "options": [ "yes", "no" ] } 应该实现。{ / p>