Posted By

iloveitaly on 10/06/07


Tagged

Singleton Shared


Versions (?)

Shared/Singleton Objects


 / Published in: PHP
 

  1. class PromotionManager {
  2. static $sharedInstance;
  3.  
  4. static function sharedManager () {
  5. if(!self::$sharedInstance) {
  6. self::$sharedInstance = new self();
  7. }
  8.  
  9. return self::$sharedInstance;
  10. }
  11.  
  12. function __construct() {
  13.  
  14. }
  15. }

Report this snippet  

You need to login to post a comment.