打赏

2021年8月21日

抽象工厂模式

摘要: 抽象工厂模式 <?php interface PayInterface { public function pay(); } class AliPay implements PayInterface { public function pay() { return "支付宝支付"; } } clas 阅读全文

posted @ 2021-08-21 12:27 头大的冯冯 阅读(9) 评论(0) 推荐(0) 编辑

方法工厂模式

摘要: 方法工厂模式 <?php interface LogInterface { public function log(); } //mysql报错日志 class MysqlLog implements LogInterface { public function log() { // TODO: I 阅读全文

posted @ 2021-08-21 11:52 头大的冯冯 阅读(12) 评论(0) 推荐(0) 编辑

单工厂模式

摘要: 简单工厂模式 <?php //简单工厂模式 //mysql报错日志 class MysqlLog { } //Redis报错日志 class RedisLog { } //用户操作错误日志 class UserLog { } //代码错诶日志 class ErrorLog { } class Pro 阅读全文

posted @ 2021-08-21 11:30 头大的冯冯 阅读(10) 评论(0) 推荐(0) 编辑

导航