[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] Backward compatibility old php version

From: Gustavo Novaro
Subject: [Dolibarr-dev] Backward compatibility old php version
Date: Tue, 21 Jun 2011 15:07:55 -0300

Hi everybody,
When coding in dolibarr i see in all files are coding with old php
rules, i promote php 5 and php 4 don't have official support, don't
promote old practice like register globals, old php object model.

all classes are codded like this

class Skeleton_class
     var $db;                            //!< To store db handler
     var $error;                            //!< To return error code
(or message)
     var $errors=array();                //!< To return several error
codes (or messages)
     //var $element='skeleton';            //!< Id that identify managed
     //var $table_element='skeleton';    //!< Name of table without
prefix where object is stored

     var $id;
     var $prop1;
     var $prop2;
         function initAsSpecimen()


please replace all var in properties for public, private and protected
and all methods we have accesors
public function...

All classes or pure php files should not have the closing tag for php
"?>", since the compiler will not interpret it and if they have any
newline at the end of the interrupt after the execution of scripts, it
is good practice to use this promoting the project mediawiki.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]