![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
最美不过下雨天啊
ZLSN.
展开
-
php设计模式
php 设计模式 转自:https://www.cnblogs.com/siqi/archive/2012/09/09/2667562.html 1.单例模式 单例模式顾名思义,就是只有一个实例。作为对象的创建模式, 单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。 单例模式的要点有三个: 一是某个类只能有一个实例;二是它必须转载 2017-11-24 17:21:44 · 243 阅读 · 0 评论 -
PHP八大设计模式
PHP命名空间 转自http://blog.csdn.net/flitrue/article/details/52614599?reload 可以更好地组织代码,与Java中的包类似。 Test1.php namespace Test1;//命名空间Test1 function test(){ echo __FILE__; } Test2.php namespace Test转载 2017-11-24 17:29:22 · 169 阅读 · 0 评论