DataObject setFrom with array values
| From: | Julie Knoll | Date: | Wed, 26 Jan 2005 20:51:15 +0000 |
| Subject: | DataObject setFrom with array values | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17185@lists.php.net to get a copy of this message | ||
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