|
Posted by Jerry Stuckle on 11/09/07 18:07
otrWalter@gmail.com wrote:
> I'm trying to display that type, name and value to class properties.
> Yes, I know about print_r().
>
> I'm just trying to build a display format for this information. AFAIK,
> the standard PHP tools to look into classes do not give you PRIVATE
> and PROTECTED properties (nor methods), but the print_r() does! (At
> least for properties it does.)
>
> This this display below...
>
> // [this is a stored in a string variable]
> Vegetable Object
> (
> [edible:private] => spinach
> [color:protected] => green
> [size] => 1
> )
>
> Now, I'd like to parse this string (above) into 3 arrays:
> 1) Public
> 2) Private
> 3) Protected
>
> Each having a list of variables names with their values, as so...
>
> array
> (
> [private] => ([edible] => spinach),
> [protected] => ([color] => green),
> [public] => ([size] => 1)
> }
>
> Any ideas?
>
> thanks
>
> walter
>
> PS: Any one know how to get the list of PRIVATE and PROTECTED methods
> from a class? Without parsing the actual file?
>
>
No, that's the whole purpose of PRIVATE and PROTECTED members. If you
want to list them, you need the code as a class member.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|