Re: DB_DataObject Can getLink() return child class of DB_DataObject
| From: | Ben Ford | Date: | Fri, 01 Apr 2005 00:15:54 +0000 |
| Subject: | Re: DB_DataObject Can getLink() return child class of DB_DataObject | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18452@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
On Thu, 31 Mar 2005 16:00:15 -0800, Ben Ford <ben@naturestears.com> wrote:Perfect! I thank you for your time! You have saved me from several mistakes and, I learned a bit more how to use DB_DataObject correctly.Regenerate them. The newer versions of DB_DataObject will use PHP5 syntax when you use the generator in PHP5. :-)1) If your toString method is heavily dependant on the table you're getting the string for, put a special toString method in each table's class which does what it needs to do. It's perfectly fine to edit an auto-generated class as long as you leave the stuff between the autogenerated markers alone.Yes, I was originally trying not to edit the auto-generated classes. (I am using PHP 5 objects and the auto-generated are PHP 4 style. I suppose I didn't want to mix syntax and it I wanted to use PHP 5. In the end, who cares though.)