Beispiel #1
0
 public static function getInstance()
 {
     if (self::$mInstance != null) {
         return self::$mInstance;
     } else {
         self::$mInstance = new OssFS();
         return self::$mInstance;
     }
 }
function wfGetFS($which = FS_ANY)
{
    global $wgUseOss;
    if ($which == FS_DISK) {
        return DiskFS::getInstance();
    }
    if ($which == FS_OSS) {
        return OssFS::getInstance();
    }
    if ($which == FS_ANYTHING) {
        if ($wgUseOss) {
            return OssFS::getInstance();
        } else {
            return DiskFS::getInstance();
        }
    }
}