axel wrote:
Hello Jochem,
> Axel lets start again.
Okay.
> SO: explain, please, why and what you are trying to do (DETAILS!).
> don't dumb it down because that just makes the problem look moot.
I need the classname to register variables in the session. It's
complicated. There are a lot
Hello Jochem,
> Axel lets start again.
Okay.
> SO: explain, please, why and what you are trying to do (DETAILS!).
> don't dumb it down because that just makes the problem look moot.
I need the classname to register variables in the session. It's
complicated. There are a lot of inheritences
axel wrote:
Hello Jochem,
Axel lets start again.
you seem to want to write a method in 1 base class that
will give you the correct classname when you call
the method statically on the/a subclass) ...
In all cases It _seems_ to me that you must already know
the name of the class in order to ge
Hello Jochem,
either you tested some different code to what you posted above OR
(your build of?) 5.0.3 is borked.
sorry, I didn't tested the code at all, because my code is more complex.
I just tried to show the problem.
class ClassA {
public static function getClassName() {
return
Hello Richard,
thanks for for your answer.
a> class ClassA {
a>function getClassName() {
a> return get_class($this); # [1]
a>}
a> }
a> class ClassB extends ClassA { }
a> echo ClassB::getClassName();
a> this script echoes "Object" instead of "ClassB". but i would like to
a> return
axel wrote:
Hello,
following code won't work in the expected way:
class ClassA {
function getClassName() {
return get_class($this); # [1]
}
}
class ClassB extends ClassA { }
echo ClassB::getClassName();
this script echoes "Object" instead of "ClassB". but i would like to
either you
Hello axel,
Tuesday, July 26, 2005, 8:02:05 PM, you wrote:
a> class ClassA {
a>function getClassName() {
a> return get_class($this); # [1]
a>}
a> }
a> class ClassB extends ClassA { }
a> echo ClassB::getClassName();
a> this script echoes "Object" instead of "ClassB". but i would like
Hello,
following code won't work in the expected way:
class ClassA {
function getClassName() {
return get_class($this); # [1]
}
}
class ClassB extends ClassA { }
echo ClassB::getClassName();
this script echoes "Object" instead of "ClassB". but i would like to
return the classname of th
8 matches
Mail list logo