Re: Newbie: Array of objects iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----
> From: MEM <talofo@xxxxxxxxx>
> To: Tommy Pham <tommyhp2@xxxxxxxxx>; php-general@xxxxxxxxxxxxx
> Sent: Sat, October 10, 2009 2:49:23 AM
> Subject: RE:  Newbie: Array of objects iteration
> 
> > 
> > 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
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Márcio,

Sorry, I don't remember since it's been over 5 years I used reflection.  Reflection has many uses, 1 of it is that it allow you reverse engineer any PHP app ;)

Regards,
Tommy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux