Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyObject {
- static private $instance;
- static public function Singleton() {
- if (empty(self::$instance)) {
- self::$instance = new MyObject;
- }
- return self::$instance;
- }
- /* The rest of your class */
- }
Add Comment
Please, Sign In to add comment