Re: DB_DataObject and PHP5

From: Date: Fri, 08 Oct 2004 07:02:39 +0000
Subject: Re: DB_DataObject and PHP5
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14812@lists.php.net to get a copy of this message
should be fixed in CVS. Regards Alan Denis Gerasimov 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. Best regards, Denis Gerasimov Outsourcing Services Manager, VEKOS, Ltd. www.vekos.ru


« previous php.pear.general (#14812) next »