/** * 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; } } }
/** * 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; } } }