热门标签
更多>
搜索结果
查询Tags标签: ArmyVisitor,共有 2条记录-
php观察者模式,组合ArmyVisitor抽象类,用accept()方法将访问者对象传递给当前对象的所有的子元素,当前组件是一个组合体
<?php /** 抽象父类**/ abstract class Unit{public $depth=0;function getComposite(){return null;}function textDump($num=0){$ret="";$pad=4*$num;$ret.=sprintf("%{$pad}s","");$ret.=get_class($this);$ret.="bombard: &qu…
2022/1/3 1:07:43 人评论 次浏览 -
php观察者模式,组合ArmyVisitor抽象类,用accept()方法将访问者对象传递给当前对象的所有的子元素,当前组件是一个组合体
<?php /** 抽象父类**/ abstract class Unit{public $depth=0;function getComposite(){return null;}function textDump($num=0){$ret="";$pad=4*$num;$ret.=sprintf("%{$pad}s","");$ret.=get_class($this);$ret.="bombard: &qu…
2022/1/3 1:07:43 人评论 次浏览