05 2019 档案
摘要:send = $send; } abstract public function msg($content); public function send($to,$content){ $content = $this->msg($content); $this->send->send($to,$content); } } ...
阅读全文
摘要:28,'wind' =>7,'sun' => 'sunny']; return serialize($today); } } //适配器 class AdapterTianqi extends tianqi { public static function show(){ $today = unserialize(parent::show())...
阅读全文
摘要:content = $content; } public function decorator(){ return $this->content; } } //编辑文章摘要 class BianArt extends BaseArt { public function __construct(BaseArt $art){ ...
阅读全文
摘要:calc = new $calc(); } public function calc($op1,$op2){ return $this->calc->calc($op1,$op2); } } $type = $_POST['op']; $cmath = new CMath($type); echo $cmath->calc((int)$_POST...
阅读全文
摘要:<?php //观察者模式 class User implements SplSubject{ public $lognum; public $hobby; protected $observers = null; public function __construct($hobby){ $this
阅读全文
摘要://单例模式 class sigle{ private static $ins = null; public static function getIns(){ if(self::$ins === null){ self::$ins = new self(); } return s...
阅读全文
摘要:_hash($key); //先取圆环上最小的一个节点 $node = current($this->_postion); foreach($this->_postion as $k=>$v){ if($point _mul;$i++){ $this->_posti...
阅读全文