【发布时间】:2016-04-09 15:31:01
【问题描述】:
你好,我可以在 laravel 框架中问这个问题
namespace Illuminate\Support\Facades;
/**
* @see \Illuminate\Auth\AuthManager
* @see \Illuminate\Contracts\Auth\Factory
* @see \Illuminate\Contracts\Auth\Guard
* @see \Illuminate\Contracts\Auth\StatefulGuard
*/
class Auth extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'auth';
}
}
return 'auth' 究竟返回给调用者的是什么?它是文本'auth'还是一个对象?他们在该类中只有一种方法的原因是什么?抱歉,我只是在学习 oop。
提前谢谢你。
【问题讨论】:
-
它在引号中,它将作为字符串返回。
-
并等待返回“auth”到底返回给调用者的问题是什么?
标签: php laravel laravel-5 laravel-5.2 laravel-facade