Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved magic strings to recreatable URL model:
- Loading branch information
1 parent
21aa105
commit b15ec7a
Showing
9 changed files
with
85 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// BLKUrlModel.h | ||
// bLock | ||
// | ||
// Created by Mario Gonzalez on 5/20/12. | ||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
@interface BLKUrlModel : NSObject { | ||
} | ||
|
||
+(BLKUrlModel*) sharedInstance;; | ||
-(NSString*)getURLForPath:(NSString*)aPath; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// BLKUrlModel.m | ||
// bLock | ||
// | ||
// Created by Mario Gonzalez on 5/20/12. | ||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import "BLKUrlModel.h" | ||
#import "Constants.h" | ||
|
||
@implementation BLKUrlModel | ||
|
||
-(NSString*) getURLForPath:(NSString*)aPath { | ||
|
||
NSString* returnString = [NSString stringWithFormat:@"%@://%@%@:%@/%@", kURLPrefixServerProtocol, kURLPrefixServerSubdomain, kURLPrefixServerDomain, kURLPrefixServerPort, aPath]; | ||
NSLog( @"BLKUrlModel::getURLForPath - %@", returnString ); | ||
return returnString; | ||
} | ||
|
||
|
||
#pragma mark Singleton Implementation | ||
static BLKUrlModel* __instance = nil; | ||
+(BLKUrlModel*) sharedInstance { | ||
if(__instance) return __instance; | ||
@synchronized( [BLKUrlModel class] ) { | ||
if(!__instance) { | ||
__instance = [[self alloc] init]; | ||
} | ||
return __instance; | ||
} | ||
|
||
NSLog(@"Error creating CoreDataController singleton!"); | ||
return nil; | ||
} | ||
|
||
+(void)end { | ||
__instance = nil; | ||
}; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters