Frage zu Programmierstil Hallo Leute,
gern möchte ich eure Meinung zu dem nachfolgend aufgezeigten Programmierstil wissen: index.php:
...
include("include/db.php");
include("include/module_abc.php");
include("include/module_xyz.php");
$main_db = new class_db();
$module_abc = new class_module_abc($main_db);
$module_xyz = new class_module_xyz($main_db);
... module_abc.php:
class class_module_abc
{ var $main_db;
function module_abc.php($param_db)
{ $this->main_db = $param_db; $ergebnis = $this->main_db->funktion_abc();
}
}
Mir geht es hauptsächlich um die unterstrichene Zeile.
Vielen Dank |