-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFAFPHPSerializer.h
More file actions
43 lines (32 loc) · 1.09 KB
/
FAFPHPSerializer.h
File metadata and controls
43 lines (32 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// FAFPHPSerializer.h
//
// Created by Manoah F Adams on 2012-10-22.
// Copyright 2012-2014 Manoah F Adams. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface FAFPHPSerializer : NSObject
{
BOOL _shouldAutoGuessEmptyStrings;
}
/*!
\brief Should the library assume that a string with a positive length, but appearing to be empty, is empty.
Any string being unserialized in the format s:6:"" will be considered empty.
Default is NO (off).
*/
- (BOOL)shouldAutoGuessEmptyStrings;
- (void)setShouldAutoGuessEmptyStrings:(BOOL)value;
/*!
\brief Convert an NSArray, NSDictionary, NSNumber, or NSString to a string that can be read with PHP's unserialize().
*/
- (NSString*) serializeItem:(id)item;
/*!
\brief Convert a string created by PHP's serialize() function into the corresponding NSArray, NSDictionary, NSNumber, or NSString.
*/
- (id) unserializeItem:(NSString*)item;
/*!
\brief Returns a string of PHP source code that would produce the equivalent of the input NSArray.
This method is tentative, and not used much currently.
*/
- (NSString*) phpSourceForArray:(NSArray*)array;
@end