php-general Digest 10 Oct 2009 23:34:53 -0000 Issue 6384

Topics (messages 298829 through 298829):

Re: Newbie: Array of objects iteration
        298829 by: Torben Wilson

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
2009/10/10 MEM <tal...@gmail.com>:
>>
>> MEM,
>>
>> http://www.php.net/language.oop5.reflection
>>
>>
>> Regards,
>> Tommy
>>
>>
>
>
> And brand new world opens in from of my eyes... O.O.
>
> I will search more info on this on the net... just for the records, as
> properties names is concern, I couldn't find any better I suppose:
> http://pt.php.net/manual/en/reflectionproperty.getname.php
>
>
> I'm just wondering, we call it like this?
> $property = new ReflectionProperty($myproperty);
> $proptertyName = $property->getName();
>
>
> Can we called statically like this?
> $propertyName = ReflectionProperty::getName($myproperty);      -> this would
> be nice. :)
>
> The documentation is a little bit lacking, and I'm a little bit newbie, is
> this correct?
>
> Note:
> The array_keys as a possibility to retrieve ALL keys from a given array. It
> would be nice to retrieve ALL properties names at once as well...
> :)
>
>
>
> Regards,
> Márcio

Hi Márcio,

You may also find the following useful:

http://php.net/get_class_vars
http://php.net/get_object_vars
http://php.net/reflectionclass.getproperties


Regards,

Torben

--- End Message ---

Reply via email to