Re: DB_DataObject fetch methods
| From: | Ian Eure | Date: | Thu, 11 Mar 2004 06:52:31 +0000 |
| Subject: | Re: DB_DataObject fetch methods | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26285@lists.php.net to get a copy of this message | ||
On Wednesday 10 March 2004 03:34 pm, Alex Hayes wrote:
> Yes, you are correct. However I believe this would be know different to the
> way in which DB works i believe.
>
DB is rather different, as it only returns an array. Instantiating objects
takes rather more CPU time, and DB_DataObject alone is over 3k lines long.
Some of my projects have up to 1k more lines to process. That is a
non-trivial amount of overhead per instance.
> There are definetely times when it is not viable to do it in this way,
> however, there are times when it makes things alot easier and alot more
> straightforward to do it in this manner.
>
Yes, and for those cases, you should use the function you wrote, or something
like it. I think that it's a bad idea to have something that does that come
standard in DB_DO.