摘要: <?php//备忘录模式class GameRole { private $attack,$defence,$lifetime; function __construct() { $this->getStatus(); } function getStatus() { $this->attack = 100; $this->defence = 100; ... 阅读全文
posted @ 2012-12-05 16:20 phpzxh 阅读(569) 评论(0) 推荐(0) 编辑
摘要: <?phpinterface Subject { function attach($obj); function detach($name); function notify();}class Teacher implements Subject { private $attachArr = array(); function __construct() { } function attac... 阅读全文
posted @ 2012-12-05 16:19 phpzxh 阅读(1033) 评论(0) 推荐(0) 编辑