Christian Schneider wrote:
Torsten Roehr wrote:
Something so straightforward and fundamental should be possible!?!
Maybe is isn't as fundamental as you think? I never came across this
problem in years of PHP programming. But then again I use classes with
static calls for nothing but separate nam
> -Original Message-
> From: Christian Schneider [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 12, 2005 9:05 PM
> To: Torsten Roehr
> Cc: internals@lists.php.net
> Subject: Re: Get name of extending class with static method call (PHP5)
>
>
> Hey Torsten,
>
> Torsten Roehr wrote:
> >
"Johannes Schlueter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > With PHP4 it was possible to get the correct class name with
> > debug_backtrace(). This behaviour has been changed in PHP5.
> > How can I get the name of the extending class that invoked the method in
> > drive()?
Hey Torsten,
Torsten Roehr wrote:
$persons = Person::load($sql); // returns collection of Person objects
$cars= Car::load($sql);// returns collection of Car objects
Simple solutions:
1) $persons = DB::load('Person', $sql); foreach ($persons as $person)...
2) $person = new Person($sql); whil
Torsten Roehr wrote:
Something so straightforward and fundamental should be possible!?!
Maybe is isn't as fundamental as you think? I never came across this
problem in years of PHP programming. But then again I use classes with
static calls for nothing but separate namespaces :-)
I'm pretty sure
"Christian Schneider" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Torsten Roehr wrote:
> > Something so straightforward and fundamental should be possible!?!
>
> Maybe is isn't as fundamental as you think? I never came across this
> problem in years of PHP programming. But then ag
> With PHP4 it was possible to get the correct class name with
> debug_backtrace(). This behaviour has been changed in PHP5.
> How can I get the name of the extending class that invoked the method in
> drive()?
There was a short discussion on this on this list, too some month ago. The
result was t