Answer the question
In order to leave comments, you need to log in
How to pass the name of the class in which the function is called to another class?
For example, I have a class class Messages {}
. It has a static method public static function add() {}
. I accordingly want to know in which class (for example, MainController) the Messages::add() function was called and at the same time not to write like this every time Messages::add($msg, __CLASS__) so that it picks it up automatically.
Tell me please!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question