![]() |
От: |
dimgel
|
https://github.com/dimgel |
Дата: | 04.05.11 12:51 | ||
Оценка: |
class User {
public static function singleton($Username = NULL) {
if (!isset(self::$Instance)) {
$c = __CLASS__;
self::$Instance = new $c($Username);
}
return self::$Instance;
}
...
}