2017-08-26 99 views
3

我學習Laravel框架的源代碼。我達到以下命令。php短語的含義是什麼?

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)); 
    } 


} 

所以,我需要知道$這個意義[MyClass的:類] - >的someMethod()在PHP語法的短語。

$this數組?怎麼樣?

感謝

+0

$這是這裏的對象 – mindaJalaj

回答

3

Application擴展Container其自身實現ArrayAccess,所以$this[HttpKernelContract::class]本質要求$this->offsetGet(HttpKernelContract::class)應在Container實施。