2016-05-24 22 views
0

爲什麼Laravel Application類需要實現HttpKernelInterface?不使用HttpKernelInterface方法。laravel應用程序實現HttpKernelInterface

<?php 
    namespace Illuminate\Foundation; 

    class Application extends Container implements ApplicationContract, HttpKernelInterface 
    {  
    }  
?> 

回答

0

當然可以。

HereHttpKernalInterface的定義。它定義了handle()方法的合同,該方法負責將Request轉換爲Response

handle()方法在Applicationhere中實現。