摘要:
写一个简单是单例模式的例子class Pattern{ Private $array=array(); private Static $instance; Private function __construct(){ } public static function getInstance(){ if(empty(self::$instance)){ self::$instance=new Pattern(); } return self::$instance; } publi... 阅读全文