Re: How to get class constants with there value?
| From: | Steve | Date: | Fri, 23 Mar 2007 21:15:12 +0000 |
| Subject: | Re: How to get class constants with there value? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251222@lists.php.net to get a copy of this message | ||
Doesn't that destroy the entire reason for having variables within a class
in the first place? Why not set them as private and use accessors and
mutators to mess with their values? If you aren't going to use those, why
not just create global variables and functions? You basically lose your
entire reason for having a class if you allow scripts to just reach inside
of it and take whatever they want.
"Mathijs" <mathijs.van.veluw@smscity.com> wrote in message
news:86.97.02386.2E4A3064@pb1.pair.com...
> Hello there,
>
> I use PHP5, and i wanted to know if there is an option to extract class
> constants with there name and value without using Refelection.
>
> Now i need to create a reflection of the class to get the info.
>
> Is there something like get_class_variables for constants??
>
> Thx in advanced.