Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我的对象是哪个类的实例。
像
class user { }
class driver extends user {}
我想知道当用户登录时,symfony 是否创建了用户或驱动程序的实例
get_called_class()功能应该为您解决问题。
get_called_class()