For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > January 2005 > DataObject setFrom with array values









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DataObject setFrom with array values
Julie Knoll

2005-01-26, 8:56 pm

Hello,

I'm using quickform and dataobject together. In the form I have a date
element that submits its value as an array. In my dataobject I have a
custom setDate method.

When I use setFrom($form->exportValues()), it doesn't call my setDate method
or set the var at all. It doesn't actually call the custom set methods for
any of the elements that are arrays.

I think its because of this code in the setFrom method in DataObject.php:

if (is_array($from[sprintf($format,$k)])) {
continue;
}

Is this supposed to work like this? If so why? Otherwise is there
something I'm missing?

Thanks,
Julie
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com