link http://www.python.org
link http://pickle-js.googlecode.com
see
see
package Default
inherited_from \Zend\Serializer\Adapter\AbstractAdapter

 Methods

Constructor.

__construct(array|\Traversable|\Zend\Serializer\Adapter\PythonPickleOptions $options = null
inherited_from \Zend\Serializer\Adapter\AbstractAdapter::__construct()

Parameters

$options

array\Traversable\Zend\Serializer\Adapter\PythonPickleOptions

Optional

Constructor

__construct(array|\Traversable|\Zend\Serializer\Adapter\AdapterOptions $options = null
Inherited

Parameters

$options

array\Traversable\Zend\Serializer\Adapter\AdapterOptions

Get options

getOptions() : \Zend\Serializer\Adapter\PythonPickleOptions
inherited_from \Zend\Serializer\Adapter\AbstractAdapter::getOptions()

Returns

\Zend\Serializer\Adapter\PythonPickleOptions

Get adapter options

getOptions() : \Zend\Serializer\Adapter\AdapterOptions
Inherited

Returns

\Zend\Serializer\Adapter\AdapterOptions

Serialize PHP to PythonPickle format

serialize(mixed $value) : string

Parameters

$value

mixed

Returns

string

Set options

setOptions(array|\Traversable|\Zend\Serializer\Adapter\PythonPickleOptions $options) : \Zend\Serializer\Adapter\PythonPickle
inherited_from \Zend\Serializer\Adapter\AbstractAdapter::setOptions()

Parameters

$options

array\Traversable\Zend\Serializer\Adapter\PythonPickleOptions

Returns

\Zend\Serializer\Adapter\PythonPickle

Set adapter options

setOptions(array|\Traversable|\Zend\Serializer\Adapter\AdapterOptions $options) : \Zend\Serializer\Adapter\AbstractAdapter
Inherited

Parameters

$options

array\Traversable\Zend\Serializer\Adapter\AdapterOptions

Returns

\Zend\Serializer\Adapter\AbstractAdapter

Unserialize from Python Pickle format to PHP

unserialize(string $pickle) : mixed

Parameters

$pickle

string

Exceptions

\Zend\Serializer\Exception\RuntimeException on invalid Pickle string

Returns

mixed

Convert a unicode sequence to UTF-8

_convertMatchingUnicodeSequence2Utf8(array $match) : string

Parameters

$match

array

Returns

string

Load an empty dictionary

_loadEmptyDict() 

Clear temp variables needed for processing

clearProcessVars() 

Decode a binary long sequence

decodeBinLong(string $data) : integer | float | string

Parameters

$data

string

Returns

integerfloatstring

Convert a hex string to a UTF-8 string

hex2Utf8(string $hex) : string

Parameters

$hex

string

Exceptions

\Zend\Serializer\Exception\RuntimeException on unmatched unicode sequence

Returns

string

Return last marker position in stack

lastMarker() : integer

Returns

integer

Load a pickle opcode

load(string $op) 

Parameters

$op

string

Exceptions

\Zend\Serializer\Exception\RuntimeException on invalid opcode

Load an append (to list) sequence

loadAppend() 

Load multiple append (to list) sequences at once

loadAppends() 

Load arbitrary binary bytes

loadBinBytes() 

Load a binary float value

loadBinFloat() 

Load a binary GET operation

loadBinGet() 

Exceptions

\Zend\Serializer\Exception\RuntimeException on missing GET identifier

Load a binary integer operator

loadBinInt() 

Load the first byte of a binary integer

loadBinInt1() 

Load the second byte of a binary integer

loadBinInt2() 

Load a binary PUT

loadBinPut() 

Exceptions

\Zend\Serializer\Exception\RuntimeException on missing stack

Load a binary string

loadBinString() 

Load binary unicode sequence

loadBinUnicode() 

Load an associative array (Python dictionary)

loadDict() 

Load an empty list sequence

loadEmptyList() 

Load a float value

loadFloat() 

Load a GET operation

loadGet() 

Exceptions

\Zend\Serializer\Exception\RuntimeException on missing GET identifier

Load an integer operator

loadInt() 

Load an array (list)

loadList() 

Load a long (float) operator

loadLong() 

Load a one byte long integer

loadLong1() 

Load a 4 byte long integer

loadLong4() 

Load a long binary GET operation

loadLongBinGet() 

Exceptions

\Zend\Serializer\Exception\RuntimeException on missing GET identifier

Load a long binary PUT

loadLongBinPut() 

Exceptions

\Zend\Serializer\Exception\RuntimeException on missing stack

Load a marker sequence

loadMark() 

Load a boolean FALSE operator

loadNewFalse() 

Load a boolean TRUE operator

loadNewTrue() 

Load a NONE operator

loadNone() 

Load a proto value

loadProto() 

Exceptions

\Zend\Serializer\Exception\RuntimeException if Pickle version does not support this feature

Load a PUT opcode

loadPut() 

Exceptions

\Zend\Serializer\Exception\RuntimeException on missing stack

Load an item from a set

loadSetItem() 

Load set items

loadSetItems() 

Load a single binary byte

loadShortBinBytes() 

Load a short binary string

loadShortBinString() 

Load a string

loadString() 

Load a tuple

loadTuple() 

Load single item tuple

loadTuple1() 

Load two item tuple

loadTuple2() 

Load three item tuple

loadTuple3() 

Load a unicode string

loadUnicode() 

Add a value to the memo and write the id

memorize(mixed $value) 

Parameters

$value

mixed

Quote/Escape a string

quoteString(string $str) : string

Parameters

$str

string

Returns

stringquoted string

Read a segment of the pickle

read(mixed $len) : string

Parameters

$len

mixed

Exceptions

\Zend\Serializer\Exception\RuntimeException if position matches end of data

Returns

string

Read a line of the pickle at once

readline() : string

Exceptions

\Zend\Serializer\Exception\RuntimeException if no EOL character found

Returns

string

Search a value in the memo and return the id

searchMemo(mixed $value) : integer | boolean

Parameters

$value

mixed

Returns

integerbooleanThe id or false

Unquote/Unescape a quoted string

unquoteString(string $str) : string

Parameters

$str

string

quoted string

Returns

stringunquoted string

Write a value

write(mixed $value) 

Parameters

$value

mixed

Exceptions

\Zend\Serializer\Exception\RuntimeException on invalid or unrecognized value type

Write an associative array value as dictionary

writeArrayDict(array|\Traversable $value) 

Parameters

$value

array\Traversable

Write a simple array value as list

writeArrayList(array $value) 

Parameters

$value

array

Write boolean value

writeBool(boolean $value) 

Parameters

$value

boolean

Write a float value

writeFloat(float $value) 

Parameters

$value

float

Write a get

writeGet(integer $id) 

Parameters

$id

integer

Id of memo

Write an integer value

writeInt(integer $value) 

Parameters

$value

integer

Write a null as None

writeNull() 

Write an object as a dictionary

writeObject(object $value) 

Parameters

$value

object

Write pickle protocol

writeProto(integer $protocol) 

Parameters

$protocol

integer

Write a put

writePut(integer $id) 

Parameters

$id

integer

Id of memo

Write stop

writeStop() 

Write a string value

writeString(string $value) 

Parameters

$value

string

 Properties

 

$bigIntegerAdapter

$bigIntegerAdapter : \Zend\Math\BigInteger\Adapter\AdapterInterface

Default

null
 

Whether or not the system is little-endian

$isLittleEndian : boolean

Default

null
Static
 

$marker

$marker 

Default

null
 

$memo

$memo 

Default

array()
 

$options

$options : \Zend\Serializer\Adapter\PythonPickleOptions

Default

null
inherited_from \Zend\Serializer\Adapter\AbstractAdapter::options
 

$options

$options : \Zend\Serializer\Adapter\AdapterOptions

Default

null
 

$pickle

$pickle 

Default

''
 

$pickleLen

$pickleLen 

Default

0
 

$pos

$pos 

Default

0
 

$protocol

$protocol 

Default

null
 

Strings representing quotes

$quoteString : array

Default

array('\\' => '\\\\', "\x00" => '\\x00', "\x01" => '\\x01', "\x02" => '\\x02', "\x03" => '\\x03', "\x04" => '\\x04', "\x05" => '\\x05', "\x06" => '\\x06', "\x07" => '\\x07', "\x08" => '\\x08', "\x09" => '\\t', "\x0a" => '\\n', "\x0b" => '\\x0b', "\x0c" => '\\x0c', "\x0d" => '\\r', "\x0e" => '\\x0e', "\x0f" => '\\x0f', "\x10" => '\\x10', "\x11" => '\\x11', "\x12" => '\\x12', "\x13" => '\\x13', "\x14" => '\\x14', "\x15" => '\\x15', "\x16" => '\\x16', "\x17" => '\\x17', "\x18" => '\\x18', "\x19" => '\\x19', "\x1a" => '\\x1a', "\x1b" => '\\x1b', "\x1c" => '\\x1c', "\x1d" => '\\x1d', "\x1e" => '\\x1e', "\x1f" => '\\x1f', "\xff" => '\\xff')
Static
 

$stack

$stack 

Default

array()

 Constants

 

OP_APPEND

OP_APPEND = 'a' 
 

OP_APPENDS

OP_APPENDS = 'e' 
 

OP_BINBYTES

OP_BINBYTES = 'B' 
 

OP_BINFLOAT

OP_BINFLOAT = 'G' 
 

OP_BINGET

OP_BINGET = 'h' 
 

OP_BININT

OP_BININT = 'J' 
 

OP_BININT1

OP_BININT1 = 'K' 
 

OP_BININT2

OP_BININT2 = 'M' 
 

OP_BINPERSID

OP_BINPERSID = 'Q' 
 

OP_BINPUT

OP_BINPUT = 'q' 
 

OP_BINSTRING

OP_BINSTRING = 'T' 
 

OP_BINUNICODE

OP_BINUNICODE = 'X' 
 

OP_BUILD

OP_BUILD = 'b' 
 

OP_DICT

OP_DICT = 'd' 
 

OP_DUP

OP_DUP = '2' 
 

OP_EMPTY_DICT

OP_EMPTY_DICT = '}' 
 

OP_EMPTY_LIST

OP_EMPTY_LIST = ']' 
 

OP_EMPTY_TUPLE

OP_EMPTY_TUPLE = ')' 
 

OP_EXT1

OP_EXT1 = "\x82" 
 

OP_EXT2

OP_EXT2 = "\x83" 
 

OP_EXT4

OP_EXT4 = "\x84" 
 

OP_FLOAT

OP_FLOAT = 'F' 
 

OP_GET

OP_GET = 'g' 
 

OP_GLOBAL

OP_GLOBAL = 'c' 
 

OP_INST

OP_INST = 'i' 
 

OP_INT

OP_INT = 'I' 
 

OP_LIST

OP_LIST = 'l' 
 

OP_LONG

OP_LONG = 'L' 
 

OP_LONG1

OP_LONG1 = "\x8a" 
 

OP_LONG4

OP_LONG4 = "\x8b" 
 

OP_LONG_BINGET

OP_LONG_BINGET = 'j' 
 

OP_LONG_BINPUT

OP_LONG_BINPUT = 'r' 
 

Pickle opcodes. See pickletools.py for extensive docs.

OP_MARK = '(' 
 

OP_NEWFALSE

OP_NEWFALSE = "\x89" 
 

OP_NEWOBJ

OP_NEWOBJ = "\x81" 
 

OP_NEWTRUE

OP_NEWTRUE = "\x88" 
 

OP_NONE

OP_NONE = 'N' 
 

OP_OBJ

OP_OBJ = 'o' 
 

OP_PERSID

OP_PERSID = 'P' 
 

OP_POP

OP_POP = '0' 
 

OP_POP_MARK

OP_POP_MARK = '1' 
 

OP_PROTO

OP_PROTO = "\x80" 
 

OP_PUT

OP_PUT = 'p' 
 

OP_REDUCE

OP_REDUCE = 'R' 
 

OP_SETITEM

OP_SETITEM = 's' 
 

OP_SETITEMS

OP_SETITEMS = 'u' 
 

OP_SHORT_BINBYTES

OP_SHORT_BINBYTES = 'C' 
 

OP_SHORT_BINSTRING

OP_SHORT_BINSTRING = 'U' 
 

OP_STOP

OP_STOP = '.' 
 

OP_STRING

OP_STRING = 'S' 
 

OP_TUPLE

OP_TUPLE = 't' 
 

OP_TUPLE1

OP_TUPLE1 = "\x85" 
 

OP_TUPLE2

OP_TUPLE2 = "\x86" 
 

OP_TUPLE3

OP_TUPLE3 = "\x87" 
 

OP_UNICODE

OP_UNICODE = 'V'