public static function getInstance() { if (self::$_instance == NULL) { self::$_instance = new self(); } return self::$_instance; }
public static function factory() { $type = "memcache"; switch ($type) { case "memcache": return Zing_UserApp_Cache_Memcache::getInstance(); break; default: return Zing_UserApp_Cache_Memcache::getInstance(); break; } }