On Sun, 6 May 2001, Steven Haryanto wrote:
> Am I correct that PHP does not support class variables? That is,
> variables that belong to a class and not copied into every object.
> I need to put several arrays for information about a class, and I
> do not want to bloat every object with this data (since potentially
> I will create many instances of the class).
>
> Currently I do this with methods. Any other alternative?
For every class I do create additional class called MetaXXX where
XXX is the name of the original class. In the MetaXXX I do decla
re all variables and methods which I would make static in other
language such as C++ or Java. Then I do create one and only one
object of class MetaXXX (called metaXXX for convenience) which is
available in global scope. Hope this will help you.
Regards,
Andrzej
--
http://kokosz.horyzont.net
http://www.earthdawn.pl
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]