摘要: 优势:松耦合,屏蔽组件。依赖分层 class ali { function buy(){ echo "买入阿里<br/>"; } function sell(){ echo "卖出阿里<br>"; } } class hds { function buy(){ echo "买入x德森<br/>"; 阅读全文
posted @ 2019-12-19 14:56 千载白云 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 包装对象 扩展实例。 interface IComponent { function Display(); } class Person implements IComponent { private $name; function __construct($name){ $this->name = 阅读全文
posted @ 2019-12-19 13:54 千载白云 阅读(184) 评论(0) 推荐(0) 编辑