原程序流程
include $inifile;
$b = fun1($a);// $a是个数组,从inifile读入
if (条件1) $c = fun2($b);
if (条件2) $d = fun3($c);
echo $b,$c,$d;
....
程序其他部分
fun1 会被程序不同部分调用
当有需要时还要进一步获取$c或$d把fun1/fun2/fun3都改写成class->fun()
写进同一个class还是不同的class再用继承?大致怎样写?
include $inifile;
$b = fun1($a);// $a是个数组,从inifile读入
if (条件1) $c = fun2($b);
if (条件2) $d = fun3($c);
echo $b,$c,$d;
....
程序其他部分
fun1 会被程序不同部分调用
当有需要时还要进一步获取$c或$d把fun1/fun2/fun3都改写成class->fun()
写进同一个class还是不同的class再用继承?大致怎样写?
if (条件1) $c = $o->fun2($b);
if (条件2) $d = $o->fun3($c);
echo $b,$c,$d;这样写了就会让你的程序更有意义吗?
我这边还有十多个function呢,分管不同的DOM
就这三个fun是同一个的,跟其他没关系动机不重要,我想要个思路