Re: Re: Using DB_DataOjbect and Quickform together
| From: | Alan Knowles | Date: | Sat, 08 Mar 2003 11:21:54 +0000 |
| Subject: | Re: Re: Using DB_DataOjbect and Quickform together | ||
| References: | 1 2 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-4108@lists.php.net to get a copy of this message | ||
Now in CVS -
a standard array
$array = $dataobject->toArray();
one with user[key]..
$array = $dataobject->toArray('user[%s]');
I'll look at another release this week..
Regards
Alan
Bertrand Mansion wrote:
<alan@akbkhome.com> wrote :It's probably worth wrapping DataObjects and adding a toArray() or a toQF() method to the new base class - this may be simpler function toQF($key) { foreach($this->_get_table() as $k=>$v) $ret["{$key}[{$k}]"] = $this->$k; } return $ret; } myForm = & new UserForm('update', $dataObject->toQuickForm('user'));Hi Alan, Maybe a generic toArray() method would be nice ? ;) Bertrand Mansion Mamasam