Re: DB_DataObject and PHP5
| From: | Justin Patrin | Date: | Thu, 07 Oct 2004 16:42:27 +0000 |
| Subject: | Re: DB_DataObject and PHP5 | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14798@lists.php.net to get a copy of this message | ||
On Thu, 7 Oct 2004 13:02:53 +0400, Denis Gerasimov
<denis.gerasimov@vekos.ru> wrote:
>
> Hello all,
>
> Just one thought/wish regarding classes generated by
> DB_DataObject_createTables.bat script. For both PHP4 and PHP5 it generates
> the same class variables declaration code, e.g.:
>
> ...
> var $__table = 'contents'; // table name
> var $id; // int(10) not_null primary_key unsigned auto_increment
> var $title; // blob(255) not_null blob
> var $keywords; // blob(255) not_null blob
> var $description; // blob(255) not_null blob
> var $text; // blob(65535) blob
> ...
>
> That is OK for PHP4 but PHP5 classes should use another syntax like this (I
> use PHP5.):
>
> ...
> private $__table = 'contents'; // table name
> public $id; // int(10) not_null primary_key unsigned auto_increment
> public $title; // blob(255) not_null blob
> public $keywords; // blob(255) not_null blob
> public $description; // blob(255) not_null blob
> public $text; // blob(65535) blob
> ...
>
> I am talking about that because my Zend Studio generates debug warnings on
> these classes (saying that the syntax is obsolete) when I run Code Analyzer
> on my project.
>
> As I can see DO script generates different code for PHP4 and PHP5 so I think
> that adding this feature will not be a problem.
>
> What do you think?
> Thanks all.
>
Sounds good to me. You could always make the changes yourself and
submit a patch to the bug system. :-)
--
paperCrane --Justin Patrin--