简体   繁体   English

Facade类中的Laravel顶级应用程序实例

[英]Laravel top level Application instance in Facade class

In Laravel facade class there is the following static method. 在Laravel Facade类中,有以下静态方法。

public static function setFacadeApplication($app)
{
    static::$app = $app;   
} 

Which sets the Laravel application instance as the Facade class static property, so that facades can be resolved out of the IoC container. 它将Laravel应用程序实例设置为Facade类的静态属性,以便可以从IoC容器中解析外观。 Facade class has access to application instance through this method but how? Facade类可以通过此方法访问应用程序实例,但是如何? I can't find where this method above is called. 我找不到上述此方法的调用位置。

I found a solution. 我找到了解决方案。 My vim ctags couldn't find but it is called from 我的vim ctags找不到,但是从

Illuminate\Foundation\start.php on line 93.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM