摘要:
C:\Python31\python.exe D:/pythoncode/a6.py[1][]Process finished with exit code 0 C:\Python31\python.exe D:/pythoncode/a7.py123456789Process finished w 阅读全文
posted @ 2018-04-02 11:17
孙龙-程序员
阅读(110)
评论(0)
推荐(0)
摘要:
策略模式 阅读全文
posted @ 2018-04-02 11:13
孙龙-程序员
阅读(155)
评论(0)
推荐(0)
摘要:
<?php class baseart{ public $content; protected $art = null; public function __construct($content){ $this->content = $content; } public function decor 阅读全文
posted @ 2018-04-02 11:13
孙龙-程序员
阅读(169)
评论(0)
推荐(0)
摘要:
<?php <?php class sigle{ protected static $ins = null; public static function getins(){ if(self::$ins null){ self::$ins = new self(); } return self::$ 阅读全文
posted @ 2018-04-02 11:13
孙龙-程序员
阅读(115)
评论(0)
推荐(0)
摘要:
工厂模式 阅读全文
posted @ 2018-04-02 11:13
孙龙-程序员
阅读(277)
评论(0)
推荐(0)
摘要:
<?php #观察者模式 /** 观察者模式属于行为模式,是定义对象间的一种一对多的依赖关系,以便当一个对象的状态发生改变时,所有依 赖于它的对象都得到通知并自动刷新。 它完美的将观察者对象和被观察者对象分离。 可以在独立的对象(主体)中维护一个对主体感兴趣的依赖项(观察器)列表。 让所有观察器各自 阅读全文
posted @ 2018-04-02 11:12
孙龙-程序员
阅读(222)
评论(0)
推荐(0)
摘要:
<?php class board{ protected $power = 1; protected $top = "admin"; public function process($lev){ if($lev <= $this->power){ echo "版主删帖"; }else{ $top = 阅读全文
posted @ 2018-04-02 11:12
孙龙-程序员
阅读(140)
评论(0)
推荐(0)
摘要:
<?php #Bridge(桥接)模式:将抽象部分与它的实现部分分离,使它们都可以独立的变化 //实现站内、eamil都能发送普通信息和紧急信息 //抽象类,定义信息 abstract class info{ protected $send = null; public function __con 阅读全文
posted @ 2018-04-02 11:11
孙龙-程序员
阅读(187)
评论(0)
推荐(0)