Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Michael is correct. I would pass the name of the button as an argument to
the constructor:
$instanceref = new HTMLButton('ButtonName');
Inside the constructor definition you can save the button name that was
passed in as an instance variable. Use the instance variable inside the
member function that generates your HTML and JavaScript.
Bruce
----- Original Message -----
From: "Michael" <EMAIL:PROTECTED>
To: "MLUG Members" <EMAIL:PROTECTED>
Sent: Tuesday, September 09, 2003 8:20 PM
Subject: Re: [MLUG] PHP OOP Question
> You'd have to set it inside the class first. An object instance is just
> like any other data in that it doesn't know or care what variables point
> to it. The only way to change that is to specify that data yourself.
>
> > How would I retrieve the variable name of an instance
> > of a class.
> >
> > eg. $classname = new whateverclass();
> >
> > How would I retrieve $classname from inside the whateverclass()?
>
>
> --
> 01001001 01100110 00100000 01111001 01101111 01110101 00100000 01100011
> 01100001 01101110 00100000 01110010 01100101 01100001 01100100 00100000
> 01110100 01101000 01101001 01110011 00100000 01110100 01101000 01100101
> 01101110 00100000 01111001 01101111 01110101 00100000 01101110 01100101
> 01100101 01100100 00100000 01101100 01100001 01101001 01100100 00101110
>
> Michael <EMAIL:PROTECTED>
> http://kavlon.org
>
> _______________________________________________
> members mailing list
> EMAIL:PROTECTED
> http://mlug.missouri.edu/mailman/listinfo/members
>
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members