Determine what namespace the function was called in

后端 未结 3 570
心在旅途
心在旅途 2021-01-12 10:56

I was wondering if it was possible to determine what the current namespace was when the function was being called. I have this function declaration:



        
3条回答
  •  悲哀的现实
    2021-01-12 11:31

    i don't know if i'm missing something, but with this:

    http://php.net/manual/en/reflectionclass.getnamespacename.php, i think that you can get namespace of the object you are using.

提交回复
热议问题