示例#1
0
 /**
  * Connect to the right CDN provider library
  */
 private static function connection()
 {
     if (self::$cdn == NULL) {
         if (Kohana::config("cdn.cdn_provider") == 'cloudfiles') {
             // Okay, configured properly to use a supported provider.
             self::$cdn = new Cloudfiles();
         } else {
             return FALSE;
         }
     }
 }
示例#2
0
 /**
  * Connect to the right CDN provider library
  */
 private static function connection()
 {
     if (self::$cdn == NULL) {
         try {
             if (Kohana::config("cdn.cdn_provider") == 'cloudfiles') {
                 // Okay, configured properly to use a supported provider.
                 self::$cdn = new Cloudfiles();
             } else {
                 return FALSE;
             }
         } catch (Exception $e) {
             Kohana::log('error', Kohana::config("settings.subdomain") . " CDN ERROR: " . $e->getMessage());
             return FALSE;
         }
     }
 }