how to get calling method identity?
| From: | Alberto Serra | Date: | Thu, 04 Jul 2002 06:26:41 +0000 |
| Subject: | how to get calling method identity? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105369@lists.php.net to get a copy of this message | ||
Hi!
I already made this question, but probably I kinda made it in obscure terms. Trying to get clearer.
let's look at this:
function utility() {
}
Class a {
function some_method() {
utility();} } now, how can utility know that it's being called by a::some_method()? What I need is to build something that will output an error message like "error in a::some_method" get_class() will work only if I pass a reference every time I call utility, like utility(&$this) which is already not really what I want. And anyway this would not solve the problem of knowing which method was executed when the event occurred. Any idea? Alberto Kiev -- @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@ LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......