Пример #1
0
   public static function singleton() 
   {
      if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c;
      }

      return self::$instance;
   }