Re: Get name of extending class with static method call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jason Barnett" <jason.barnett@xxxxxxxxxxxxx> wrote in message
news:20050111164037.7759.qmail@xxxxxxxxxxxxxxx
> M. Sokolewicz wrote:
> > try using __CLASS__
> >
> > Torsten Roehr wrote:
> >
>
> This is a good suggestion but I wonder... Torsten do you have a large
> heirarchy of parent classes or just one parent?  E.g. Car -> Sports Car
> -> Porsche.  More importantly will __CLASS__ resolve to the class name
> that you need...
>
> If __CLASS__ works for you then I would go with it.  If not can you just
> send the appropriate class name as a parameter?

__CLASS__ contains the name of the class the method is in. In my sample it
would be 'Car' and not 'Porsche'.

What I don't understand is why the behaviour of debug_backtrace() has been
changed!?!

Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux