Zend Framework
1.12
|
Public Member Functions | |
__construct ($opts=array()) | |
Constructor. | |
setOption ($name, $value) | |
Set an option. | |
serialize ($value, array $opts=array()) | |
Serialize PHP to PythonPickle format. | |
unserialize ($pickle, array $opts=array()) | |
Unserialize from Python Pickle format to PHP. | |
![]() | |
__construct ($opts=array()) | |
Constructor. | |
setOptions ($opts) | |
Set serializer options. | |
setOption ($name, $value) | |
Set a serializer option. | |
getOptions () | |
Get serializer options. | |
getOption ($name) | |
Get a serializer option. | |
Public Attributes | |
const | OP_MARK = '(' |
const | OP_STOP = '.' |
const | OP_POP = '0' |
const | OP_POP_MARK = '1' |
const | OP_DUP = '2' |
const | OP_FLOAT = 'F' |
const | OP_INT = 'I' |
const | OP_BININT = 'J' |
const | OP_BININT1 = 'K' |
const | OP_LONG = 'L' |
const | OP_BININT2 = 'M' |
const | OP_NONE = 'N' |
const | OP_PERSID = 'P' |
const | OP_BINPERSID = 'Q' |
const | OP_REDUCE = 'R' |
const | OP_STRING = 'S' |
const | OP_BINSTRING = 'T' |
const | OP_SHORT_BINSTRING = 'U' |
const | OP_UNICODE = 'V' |
const | OP_BINUNICODE = 'X' |
const | OP_APPEND = 'a' |
const | OP_BUILD = 'b' |
const | OP_GLOBAL = 'c' |
const | OP_DICT = 'd' |
const | OP_EMPTY_DICT = '}' |
const | OP_APPENDS = 'e' |
const | OP_GET = 'g' |
const | OP_BINGET = 'h' |
const | OP_INST = 'i' |
const | OP_LONG_BINGET = 'j' |
const | OP_LIST = 'l' |
const | OP_EMPTY_LIST = ']' |
const | OP_OBJ = 'o' |
const | OP_PUT = 'p' |
const | OP_BINPUT = 'q' |
const | OP_LONG_BINPUT = 'r' |
const | OP_SETITEM = 's' |
const | OP_TUPLE = 't' |
const | OP_EMPTY_TUPLE = ')' |
const | OP_SETITEMS = 'u' |
const | OP_BINFLOAT = 'G' |
const | OP_PROTO = "\x80" |
const | OP_NEWOBJ = "\x81" |
const | OP_EXT1 = "\x82" |
const | OP_EXT2 = "\x83" |
const | OP_EXT4 = "\x84" |
const | OP_TUPLE1 = "\x85" |
const | OP_TUPLE2 = "\x86" |
const | OP_TUPLE3 = "\x87" |
const | OP_NEWTRUE = "\x88" |
const | OP_NEWFALSE = "\x89" |
const | OP_LONG1 = "\x8a" |
const | OP_LONG4 = "\x8b" |
const | OP_BINBYTES = 'B' |
const | OP_SHORT_BINBYTES = 'C' |
Protected Member Functions | |
_checkProtocolNumber ($number) | |
Check and normalize pickle protocol number. | |
_write ($value) | |
Write a value. | |
_writeProto ($protocol) | |
Write pickle protocol. | |
_writeGet ($id) | |
Write a get. | |
_writePut ($id) | |
Write a put. | |
_writeNull () | |
Write a null as None. | |
_writeTrue () | |
Write a boolean true. | |
_writeFalse () | |
Write a boolean false. | |
_writeInt ($value) | |
Write an integer value. | |
_writeFloat ($value) | |
Write a float value. | |
_writeString ($value) | |
Write a string value. | |
_writeArrayDict (array $value) | |
Write an associative array value as dictionary. | |
_writeArrayList (array $value) | |
Write a simple array value as list. | |
_writeObject ($value) | |
Write an object as an dictionary. | |
_writeStop () | |
Write stop. | |
_momorize ($value) | |
Add a value to the memo and write the id. | |
_searchMomo ($value) | |
Search a value in the meno and return the id. | |
_isArrayAssoc (array $value) | |
Is an array associative? | |
_quoteString ($str) | |
Quote/Escape a string. | |
_load ($op) | |
Load a pickle opcode. | |
_loadPut () | |
Load a PUT opcode. | |
_loadBinPut () | |
Load a binary PUT. | |
_loadLongBinPut () | |
Load a long binary PUT. | |
_loadGet () | |
Load a GET operation. | |
_loadBinGet () | |
Load a binary GET operation. | |
_loadLongBinGet () | |
Load a long binary GET operation. | |
_loadNone () | |
Load a NONE operator. | |
_loadNewTrue () | |
Load a boolean TRUE operator. | |
_loadNewFalse () | |
Load a boolean FALSE operator. | |
_loadInt () | |
Load an integer operator. | |
_loadBinInt () | |
Load a binary integer operator. | |
_loadBinInt1 () | |
Load the first byte of a binary integer. | |
_loadBinInt2 () | |
Load the second byte of a binary integer. | |
_loadLong () | |
Load a long (float) operator. | |
_loadLong1 () | |
Load a one byte long integer. | |
_loadLong4 () | |
Load a 4 byte long integer. | |
_loadFloat () | |
Load a float value. | |
_loadBinFloat () | |
Load a binary float value. | |
_loadString () | |
Load a string. | |
_loadBinString () | |
Load a binary string. | |
_loadShortBinString () | |
Load a short binary string. | |
_loadBinBytes () | |
Load arbitrary binary bytes. | |
_loadShortBinBytes () | |
Load a single binary byte. | |
_loadUnicode () | |
Load a unicode string. | |
_convertMatchingUnicodeSequence2Utf8 (array $match) | |
Convert a unicode sequence to UTF-8. | |
_hex2Utf8 ($hex) | |
Convert a hex string to a UTF-8 string. | |
_loadBinUnicode () | |
Load binary unicode sequence. | |
_loadMark () | |
Load a marker sequence. | |
_loadList () | |
Load an array (list) | |
_loadAppend () | |
Load an append (to list) sequence. | |
_loadEmptyList () | |
Load an empty list sequence. | |
_loadAppends () | |
Load multiple append (to list) sequences at once. | |
_loadDict () | |
Load an associative array (Python dictionary) | |
_loadSetItem () | |
Load an item from a set. | |
_loadEmptyDict () | |
Load an empty dictionary. | |
_loadSetItems () | |
Load set items. | |
_loadTuple () | |
Load a tuple. | |
_loadTuple1 () | |
Load single item tuple. | |
_loadTuple2 () | |
Load two item tuple. | |
_loadTuple3 () | |
Load three item tuple. | |
_loadProto () | |
Load a proto value. | |
_read ($len) | |
Read a segment of the pickle. | |
_readline () | |
Read a line of the pickle at once. | |
_unquoteString ($str) | |
Unquote/Unescape a quoted string. | |
_lastMarker () | |
Return last marker position in stack. | |
_decodeBinLong ($data) | |
Decode a binary long sequence. | |
Protected Attributes | |
$_options | |
$_protocol = 0 | |
$_binary = false | |
$_memo = array() | |
$_pickle = '' | |
$_pickleLen = 0 | |
$_pos = 0 | |
$_stack = array() | |
$_marker = null | |
![]() | |
$_options = array() | |
Static Protected Attributes | |
static | $_isPhp6 = null |
static | $_isLittleEndian = null |
static | $_quoteString |
__construct | ( | $opts = array() | ) |
Constructor.
Zend_Serializer_Adapter_AdapterAbstract::__construct()
Implements Zend_Serializer_Adapter_AdapterInterface.
|
protected |
Check and normalize pickle protocol number.
int | $number |
Zend_Serializer_Exception |
|
protected |
Convert a unicode sequence to UTF-8.
array | $match |
|
protected |
Decode a binary long sequence.
string | $data |
|
protected |
Convert a hex string to a UTF-8 string.
string | $sequence |
Zend_Serializer_Exception | on unmatched unicode sequence |
|
protected |
Is an array associative?
array | $value |
|
protected |
Return last marker position in stack.
|
protected |
Load a pickle opcode.
string | $op |
Zend_Serializer_Exception | on invalid opcode |
|
protected |
Load an append (to list) sequence.
|
protected |
Load multiple append (to list) sequences at once.
|
protected |
Load arbitrary binary bytes.
|
protected |
Load a binary float value.
|
protected |
Load a binary GET operation.
Zend_Serializer_Exception | on missing GET identifier |
|
protected |
Load a binary integer operator.
|
protected |
Load the first byte of a binary integer.
|
protected |
Load the second byte of a binary integer.
|
protected |
|
protected |
Load a binary string.
|
protected |
Load binary unicode sequence.
|
protected |
Load an associative array (Python dictionary)
|
protected |
Load an empty dictionary.
|
protected |
Load an empty list sequence.
|
protected |
Load a float value.
|
protected |
|
protected |
Load an integer operator.
|
protected |
Load an array (list)
|
protected |
Load a long (float) operator.
|
protected |
Load a one byte long integer.
|
protected |
Load a 4 byte long integer.
|
protected |
Load a long binary GET operation.
Zend_Serializer_Exception | on missing GET identifier |
|
protected |
|
protected |
Load a marker sequence.
|
protected |
Load a boolean FALSE operator.
|
protected |
Load a boolean TRUE operator.
|
protected |
Load a NONE operator.
|
protected |
Load a proto value.
Zend_Serializer_Exception | if Pickle version does not support this feature |
|
protected |
|
protected |
Load an item from a set.
|
protected |
Load set items.
|
protected |
Load a single binary byte.
|
protected |
Load a short binary string.
|
protected |
Load a string.
|
protected |
Load a tuple.
|
protected |
Load single item tuple.
|
protected |
Load two item tuple.
|
protected |
Load three item tuple.
|
protected |
Load a unicode string.
|
protected |
Add a value to the memo and write the id.
mixed | $value |
|
protected |
Quote/Escape a string.
string | $str |
|
protected |
Read a segment of the pickle.
mixed | $len |
Zend_Serializer_Exception | if position matches end of data |
|
protected |
Read a line of the pickle at once.
Zend_Serializer_Exception | if no EOL character found |
|
protected |
Search a value in the meno and return the id.
mixed | $value |
|
protected |
Unquote/Unescape a quoted string.
string | $str | quoted string |
|
protected |
Write a value.
mixed | $value |
Zend_Serializer_Exception | on invalid or unrecognized value type |
|
protected |
Write an associative array value as dictionary.
array | $value |
|
protected |
Write a simple array value as list.
array | $value |
|
protected |
Write a boolean false.
|
protected |
Write a float value.
float | $value |
|
protected |
Write a get.
int | $id | Id of memo |
|
protected |
Write an integer value.
int | $value |
|
protected |
Write a null as None.
|
protected |
Write an object as an dictionary.
object | $value |
|
protected |
Write pickle protocol.
int | $protocol |
|
protected |
Write a put.
int | $id | Id of memo |
|
protected |
Write stop.
|
protected |
Write a string value.
string | $value |
|
protected |
Write a boolean true.
serialize | ( | $value, | |
array | $opts = array() |
||
) |
Serialize PHP to PythonPickle format.
mixed | $value | |
array | $opts |
Implements Zend_Serializer_Adapter_AdapterInterface.
setOption | ( | $name, | |
$value | |||
) |
Set an option.
string $name mixed $value Zend_Serializer_Adapter_PythonPickle
Implements Zend_Serializer_Adapter_AdapterInterface.
unserialize | ( | $pickle, | |
array | $opts = array() |
||
) |
Unserialize from Python Pickle format to PHP.
string | $pickle | |
array | $opts |
Zend_Serializer_Exception | on invalid Pickle string |
Implements Zend_Serializer_Adapter_AdapterInterface.
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
const OP_APPEND = 'a' |
const OP_APPENDS = 'e' |
const OP_BINBYTES = 'B' |
const OP_BINFLOAT = 'G' |
const OP_BINGET = 'h' |
const OP_BININT = 'J' |
const OP_BININT1 = 'K' |
const OP_BININT2 = 'M' |
const OP_BINPERSID = 'Q' |
const OP_BINPUT = 'q' |
const OP_BINSTRING = 'T' |
const OP_BINUNICODE = 'X' |
const OP_BUILD = 'b' |
const OP_DICT = 'd' |
const OP_DUP = '2' |
const OP_EMPTY_DICT = '}' |
const OP_EMPTY_LIST = ']' |
const OP_EMPTY_TUPLE = ')' |
const OP_EXT1 = "\x82" |
const OP_EXT2 = "\x83" |
const OP_EXT4 = "\x84" |
const OP_FLOAT = 'F' |
const OP_GET = 'g' |
const OP_GLOBAL = 'c' |
const OP_INST = 'i' |
const OP_INT = 'I' |
const OP_LIST = 'l' |
const OP_LONG = 'L' |
const OP_LONG1 = "\x8a" |
const OP_LONG4 = "\x8b" |
const OP_LONG_BINGET = 'j' |
const OP_LONG_BINPUT = 'r' |
const OP_MARK = '(' |
const OP_NEWFALSE = "\x89" |
const OP_NEWOBJ = "\x81" |
const OP_NEWTRUE = "\x88" |
const OP_NONE = 'N' |
const OP_OBJ = 'o' |
const OP_PERSID = 'P' |
const OP_POP = '0' |
const OP_POP_MARK = '1' |
const OP_PROTO = "\x80" |
const OP_PUT = 'p' |
const OP_REDUCE = 'R' |
const OP_SETITEM = 's' |
const OP_SETITEMS = 'u' |
const OP_SHORT_BINBYTES = 'C' |
const OP_SHORT_BINSTRING = 'U' |
const OP_STOP = '.' |
const OP_STRING = 'S' |
const OP_TUPLE = 't' |
const OP_TUPLE1 = "\x85" |
const OP_TUPLE2 = "\x86" |
const OP_TUPLE3 = "\x87" |
const OP_UNICODE = 'V' |