For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > August 2004 > Re: [PEAR] DB_DataObject factory class or create instance manually









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 Re: [PEAR] DB_DataObject factory class or create instance manually
Justin Patrin

2004-08-31, 8:56 pm

On Tue, 31 Aug 2004 19:10:41 +0200, Thomas Mammitzsch <smartt@gmx.de> wrote:
> hi everybody,
>
> i want to insert data in a table. Now i'm a bit about the
> examples in the manual.
>
> should i use the factory method of DB_DataObject to create an instance
> of my DataObject_table or should i create the instance manually as
> described in the manuals ->insert() function?


As Michael said, it's a matter of taste, but the preferred method is
to always use factory() when creating a DataObject instance. You can
then leave out the extra include calls for those objects. ;-)

>
> regards, Thomas
>


--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--
Sponsored Links







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

Copyright 2008 codecomments.com