[TYPO3-50-general] Generic Object Access

Sebastian Kurfürst sebastian at typo3.org
Tue Jan 6 14:54:48 CET 2009


Hey,
> Some were fixed already by Sebastian, I fixed the remaining ones plus
> some more nitpicking.
>
> Please, mind the style changes I did as well in future commits.  
> Thanks!
Thanks! I will.

>> - line 149:
>> if (array_key_exists($property,  
>> get_class_vars(get_class($object)))) {
>>
>> Why don't you use get_object_vars here? Then you wouldn't have to
>> convert the object to a class first.
>
> One side effect is that get_class_vars() doesn't return "property  
> names"
> on ArrayObject instances. With get_object_vars() does return the
> "property names", which leads to an error in the ObjectAccess class
> under certain circumstances. I changed this to get_object_vars(),  
> moved
> some code around in get/setProperty to fix this error (and possible
> speed up things) and afterwards changed isPropertyAccessible() to work
> with ArrayObject instances as well.
Great, I had this as a @todo item as well :-)

Really nice teamwork!
Sebastian


More information about the TYPO3-project-5_0-general mailing list