Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095

Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095

Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095

Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095

Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095

Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095

Warning: Invalid argument supplied for foreach() in /srv/sleepycode.com/public_html/forum/Sources/Subs-Editor.php on line 2095
Paste-1327107545:v:use_geshi-1:v:type-php
 

Paste-1327107545:v:use_geshi-1:v:type-php

Started by SleePy, Jan 21, 2012, 12:59 am

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

SleePy

/*
* userInfo as a class.  We kinda do a poor method, but its the best way for now.
*/
class userInfo
{
   public static $instanceID = 0;

   public static function _()
   {
      if (self::$instanceID == 0)
         self::$instanceID = new userInfo;

      return self::$instanceID;
   }

   public function __set($key, $value)
   {
      global $user_info;
      $user_info[$key] = $value;
   }

   public function __get($key)
   {
      global $user_info;
      return $user_info[$key];
   }

   public function __isset($key)
   {
      global $user_info;
      return isset($user_info[$key]);
   }

   public function __unset($key)
   {
      global $user_info;
      unset($user_info[$key], $user_info[$key]);
   }
}
No siggy! :D

SleePy

/*
* userInfo as a class.  We kinda do a poor method, but its the best way for now.
*/
class userInfo
{
   public static $instanceID = 0;

   public static function _()
   {
      if (self::$instanceID == 0)
         self::$instanceID = new userInfo;

      return self::$instanceID;
   }

   public function __set($key, $value)
   {
      global $user_info;
      $user_info[$key] = $value;
   }

   public function __get($key)
   {
      global $user_info;
      return isset($user_info[$key]) ? $user_info[$key] : null;
   }

   public function __isset($key)
   {
      global $user_info;
      return isset($user_info[$key]);
   }

   public function __unset($key)
   {
      global $user_info;
      unset($user_info[$key], $user_info[$key]);
   }
}
No siggy! :D

 
Browser ID: smf ()
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 2: index+Modifications.english (default), Post.english (default).
Style sheets: 3: index.css, responsive.css, jquery.sceditor.css.
Hooks called: 43 (show)
Files included: 30 - 1045KB. (show)
Memory used: 1575KB.
Tokens: post-login, post-register.
Queries used: 23.

[Show Queries]