
设计模式
chanya
这个作者很懒,什么都没留下…
展开
-
php 设计模式
组合模式:body{font:12px verdana;font-weight:bold}td{font:11px verdana;}<?phpabstract class AbstractInstrument{ private $name; private $category; private $instruments=array(); public func原创 2012-09-20 20:51:50 · 452 阅读 · 0 评论 -
php 观察者模式
观察者模式:<?phprequire_once("guanchazhe.php");class BorderDecorator extends Widget{ private $widget; function __construct(Widget $widget){ $this->widget=$widget; } public function draw(){原创 2012-09-22 16:59:47 · 460 阅读 · 0 评论 -
这学期看的书
最近一直很低迷,总感觉这学期什么都没干,什么都没学。为了证明我还是学了点什么的,所以要写这篇博客。这学期看了三本书第一本:php设计模式本书讲了php当中的17种设计模式,现以代码形式总结如下。1)适配器模式:<?php//原始错误提示类class errorObject{ private $__error; public function __construct(原创 2012-12-25 20:16:10 · 525 阅读 · 0 评论