php-単例モード-履歴書demo
1792 ワード
class single{
//
protected static $ins = null;
public static function getIns(){
if(self::$ins == null){
self::$ins = new self();
}
return self::$ins;
}
//protected new ;
//final
final protected function __construct() {
}
/**
* clone
*/
final protected function __clone() {
}
}