Hi,
one may use __CLASS__ instead of get_class().
Andrey
Torsten Roehr wrote:
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 12, 2005 6:35 PM
To: Torsten Roehr
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Get name of extending class
Torsten:
On Wed, Jan 12, 2005 at 04:58:20PM +0100, Torsten Roehr wrote:
> How can I get the name of the extending class that invoked the method in
> drive()?
class Car {
function drive($child) {
echo "parent driven in a $child\n";
}
}
class Porsche extends Car {
function dri
"Torsten Roehr" <[EMAIL PROTECTED]> writes:
> Hi devs,
>
> after a long discussion on php-general [1], searching the archives and
> trying every proposed solution without success I'm asking for your help to
> solve the following problem:
>
> class Car {
> function drive() {
> // I need
"Daniel Convissor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Torsten:
>
> On Wed, Jan 12, 2005 at 04:58:20PM +0100, Torsten Roehr wrote:
>
> > How can I get the name of the extending class that invoked the method in
> > drive()?
>
> class Car {
> function drive($child) {
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 12, 2005 6:35 PM
> To: Torsten Roehr
> Cc: internals@lists.php.net
> Subject: Re: [PHP-DEV] Get name of extending class with static method
> call(PHP5)
>
Hi devs,
after a long discussion on php-general [1], searching the archives and
trying every proposed solution without success I'm asking for your help to
solve the following problem:
class Car {
function drive() {
// I need the name of the calling class here
// in my case it