PHP单例模式
1.类不能在外面被实例化 构造函数private
2.static 静态方法 类名::方法/属性 === 类 定义$a if($a==null) $a=类名::方法 return $a
抽象类
类名 方法abstract
abstrct class 类名
abstrct function 方法名
抽象类中必须有一个为抽象方法
普通方法
变量
完整更多内容请到 http://itziyuanku.com/399/1
1.类不能在外面被实例化 构造函数private
2.static 静态方法 类名::方法/属性 === 类 定义$a if($a==null) $a=类名::方法 return $a
抽象类
类名 方法abstract
abstrct class 类名
abstrct function 方法名
抽象类中必须有一个为抽象方法
普通方法
变量
完整更多内容请到 http://itziyuanku.com/399/1