mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Add Apache license boilerplate to several files
This commit is contained in:
@@ -5,6 +5,18 @@
|
||||
// Created by Blake Watters on 4/10/12.
|
||||
// Copyright (c) 2012 RestKit. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
// Created by Blake Watters on 4/10/12.
|
||||
// Copyright (c) 2012 RestKit. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import "NSArray+RKAdditions.h"
|
||||
|
||||
|
||||
@@ -55,4 +55,7 @@
|
||||
- (NSString *)stringWithURLEncodedEntries;
|
||||
- (NSString *)URLEncodedString; // TODO: Deprecated..
|
||||
|
||||
+ (NSDictionary *)dictionaryByReverseMerging:(NSDictionary *)dictionary1 with:(NSDictionary *)dictionary2;
|
||||
- (NSDictionary *)dictionaryByReverseMergingWith:(NSDictionary *)dictionary;
|
||||
|
||||
@end
|
||||
|
||||
@@ -126,4 +126,24 @@ RK_FIX_CATEGORY_BUG(NSDictionary_RKAdditions)
|
||||
return [self stringWithURLEncodedEntries];
|
||||
}
|
||||
|
||||
+ (NSDictionary *)dictionaryByReverseMerging:(NSDictionary *)dictionary1 with:(NSDictionary *)dictionary2
|
||||
{
|
||||
NSMutableDictionary *result = [dictionary1 mutableCopy];
|
||||
[dictionary2 enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
|
||||
if ([dictionary1 objectForKey:key] && [obj isKindOfClass:[NSDictionary class]]) {
|
||||
NSDictionary *newVal = [[dictionary1 objectForKey:key] dictionaryByReverseMergingWith:(NSDictionary *)obj];
|
||||
[result setObject:newVal forKey:key];
|
||||
} else {
|
||||
[result setObject:obj forKey:key];
|
||||
}
|
||||
}];
|
||||
|
||||
return [NSDictionary dictionaryWithDictionary:result];
|
||||
}
|
||||
|
||||
- (NSDictionary *)dictionaryByReverseMergingWith:(NSDictionary *)dictionary
|
||||
{
|
||||
return [[self class] dictionaryByReverseMerging:self with:dictionary];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
// Created by Blake Watters on 5/10/12.
|
||||
// Copyright (c) 2012 RestKit. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
// Created by Blake Watters on 5/10/12.
|
||||
// Copyright (c) 2012 RestKit. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import "RKPortCheck.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user