Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MySingleton
- {
- private static $instance;
- public static function getInstance()
- {
- if (null === self::$instance) {
- self::$instance = new self;
- }
- return self::$instance;
- }
- private function __clone()
- {
- }
- private function __wakeup()
- {
- }
- protected function __construct()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement