Example #1
0
 /**
  *
  * @return OW_Storage
  */
 public static function getStorage()
 {
     if (self::$storage === null) {
         self::$storage = OW::getEventManager()->call('core.get_storage');
         if (self::$storage === null) {
             switch (true) {
                 case defined('OW_USE_AMAZON_S3_CLOUDFILES') && OW_USE_AMAZON_S3_CLOUDFILES:
                     self::$storage = new BASE_CLASS_AmazonCloudStorage();
                     break;
                 case defined('OW_USE_CLOUDFILES') && OW_USE_CLOUDFILES:
                     self::$storage = new BASE_CLASS_CloudStorage();
                     break;
                 default:
                     self::$storage = new BASE_CLASS_FileStorage();
                     break;
             }
         }
     }
     return self::$storage;
 }