Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace net\snapserv;
- trait Singleton {
- /**
- * @var self
- */
- private static $instance;
- /**
- * @return self
- */
- public static function getInstance() {
- if(!self::$instance)
- self::$instance = new self;
- return self::$instance;
- }
- private function __construct() {}
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement