link http://www.python.org
see \Zend\Serializer\Adapter\Phython3.1/Lib/pickle.py
see \Zend\Serializer\Adapter\Phython3.1/Modules/_pickle.c
link http://pickle-js.googlecode.com

 Methods

Constructor.

__construct(array | \Traversable | \Zend\Serializer\Adapter\PythonPickleOptions $options) 

Parameters

$options

array\Traversable\Zend\Serializer\Adapter\PythonPickleOptions

Optional

Serialize PHP to PythonPickle format

serialize(mixed $value) : string

Parameters

$value

mixed

Exceptions

\Zend\Serializer\Exception\ExceptionInterface

Returns

string

Set options

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

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) : int | float | string

Parameters

$data

string

Returns

intfloatstring

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() : int

Returns

int

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) : int | bool

Parameters

$value

mixed

Returns

intboolThe 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(bool $value) 

Parameters

$value

bool

Write a float value

writeFloat(float $value) 

Parameters

$value

float

Write a get

writeGet(int $id) 

Parameters

$id

int

Id of memo

Write an integer value

writeInt(int $value) 

Parameters

$value

int

Write a null as None

writeNull() 

Write an object as an dictionary

writeObject(object $value) 

Parameters

$value

object

Write pickle protocol

writeProto(int $protocol) 

Parameters

$protocol

int

Write a put

writePut(int $id) 

Parameters

$id

int

Id of memo

Write stop

writeStop() 

Write a string value

writeString(string $value) 

Parameters

$value

string

 Properties

 

$bigIntegerAdapter

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

 

Whether or not the system is little-endian

$isLittleEndian : bool

 

$marker

$marker 

 

$memo

$memo 

   

$pickle

$pickle 

 

$pickleLen

$pickleLen 

 

$pos

$pos 

 

$protocol

$protocol 

 

<p>Strings representing quotes</p>

$quoteString : array

 

$stack

$stack 

 Constants

 

OP_APPEND

OP_APPEND 

 

OP_APPENDS

OP_APPENDS 

 

OP_BINBYTES

OP_BINBYTES 

 

OP_BINFLOAT

OP_BINFLOAT 

 

OP_BINGET

OP_BINGET 

 

OP_BININT

OP_BININT 

 

OP_BININT1

OP_BININT1 

 

OP_BININT2

OP_BININT2 

 

OP_BINPERSID

OP_BINPERSID 

 

OP_BINPUT

OP_BINPUT 

 

OP_BINSTRING

OP_BINSTRING 

 

OP_BINUNICODE

OP_BINUNICODE 

 

OP_BUILD

OP_BUILD 

 

OP_DICT

OP_DICT 

 

OP_DUP

OP_DUP 

 

OP_EMPTY_DICT

OP_EMPTY_DICT 

 

OP_EMPTY_LIST

OP_EMPTY_LIST 

 

OP_EMPTY_TUPLE

OP_EMPTY_TUPLE 

 

OP_EXT1

OP_EXT1 

 

OP_EXT2

OP_EXT2 

 

OP_EXT4

OP_EXT4 

 

OP_FLOAT

OP_FLOAT 

 

OP_GET

OP_GET 

 

OP_GLOBAL

OP_GLOBAL 

 

OP_INST

OP_INST 

 

OP_INT

OP_INT 

 

OP_LIST

OP_LIST 

 

OP_LONG

OP_LONG 

 

OP_LONG1

OP_LONG1 

 

OP_LONG4

OP_LONG4 

 

OP_LONG_BINGET

OP_LONG_BINGET 

 

OP_LONG_BINPUT

OP_LONG_BINPUT 

   

OP_NEWFALSE

OP_NEWFALSE 

 

OP_NEWOBJ

OP_NEWOBJ 

 

OP_NEWTRUE

OP_NEWTRUE 

 

OP_NONE

OP_NONE 

 

OP_OBJ

OP_OBJ 

 

OP_PERSID

OP_PERSID 

 

OP_POP

OP_POP 

 

OP_POP_MARK

OP_POP_MARK 

 

OP_PROTO

OP_PROTO 

 

OP_PUT

OP_PUT 

 

OP_REDUCE

OP_REDUCE 

 

OP_SETITEM

OP_SETITEM 

 

OP_SETITEMS

OP_SETITEMS 

 

OP_SHORT_BINBYTES

OP_SHORT_BINBYTES 

 

OP_SHORT_BINSTRING

OP_SHORT_BINSTRING 

 

OP_STOP

OP_STOP 

 

OP_STRING

OP_STRING 

 

OP_TUPLE

OP_TUPLE 

 

OP_TUPLE1

OP_TUPLE1 

 

OP_TUPLE2

OP_TUPLE2 

 

OP_TUPLE3

OP_TUPLE3 

 

OP_UNICODE

OP_UNICODE