52. Class

52.1. Zend\Serializer\Adapter\PythonPickle

@link http://www.python.org

52.1.1. Methods

52.1.1.1. __construct

__construct()

Constructor.

Parameters:array|Traversable|PythonPickleOptions – Optional

52.1.1.2. setOptions

setOptions()

Set options

Parameters:array|Traversable|PythonPickleOptions
Return type:PythonPickle

52.1.1.3. getOptions

getOptions()

Get options

Return type:PythonPickleOptions

52.1.1.4. serialize

serialize()

Serialize PHP to PythonPickle format

Parameters:mixed
Return type:string

52.1.1.5. write

write()

Write a value

Parameters:mixed
Throws ExceptionRuntimeException:
 on invalid or unrecognized value type

52.1.1.6. writeProto

writeProto()

Write pickle protocol

Parameters:int

52.1.1.7. writeGet

writeGet()

Write a get

Parameters:int – Id of memo

52.1.1.8. writePut

writePut()

Write a put

Parameters:int – Id of memo

52.1.1.9. writeNull

writeNull()

Write a null as None

52.1.1.10. writeBool

writeBool()

Write boolean value

Parameters:bool

52.1.1.11. writeInt

writeInt()

Write an integer value

Parameters:int

52.1.1.12. writeFloat

writeFloat()

Write a float value

Parameters:float

52.1.1.13. writeString

writeString()

Write a string value

Parameters:string

52.1.1.14. writeArrayDict

writeArrayDict()

Write an associative array value as dictionary

Parameters:array|Traversable

52.1.1.15. writeArrayList

writeArrayList()

Write a simple array value as list

Parameters:array

52.1.1.16. writeObject

writeObject()

Write an object as an dictionary

Parameters:object

52.1.1.17. writeStop

writeStop()

Write stop

52.1.1.18. memorize

memorize()

Add a value to the memo and write the id

Parameters:mixed

52.1.1.19. searchMemo

searchMemo()

Search a value in the memo and return the id

Parameters:mixed
Return type:int|bool The id or false

52.1.1.20. quoteString

quoteString()

Quote/Escape a string

Parameters:string
Return type:string quoted string

52.1.1.21. unserialize

unserialize()

Unserialize from Python Pickle format to PHP

Parameters:string
Return type:mixed
Throws :ExceptionRuntimeException on invalid Pickle string

52.1.1.22. clearProcessVars

clearProcessVars()

Clear temp variables needed for processing

52.1.1.23. load

load()

Load a pickle opcode

Parameters:string
Throws ExceptionRuntimeException:
 on invalid opcode

52.1.1.24. loadPut

loadPut()

Load a PUT opcode

52.1.1.25. loadBinPut

loadBinPut()

Load a binary PUT

52.1.1.26. loadLongBinPut

loadLongBinPut()

Load a long binary PUT

52.1.1.27. loadGet

loadGet()

Load a GET operation

52.1.1.28. loadBinGet

loadBinGet()

Load a binary GET operation

52.1.1.29. loadLongBinGet

loadLongBinGet()

Load a long binary GET operation

52.1.1.30. loadNone

loadNone()

Load a NONE operator

52.1.1.31. loadNewTrue

loadNewTrue()

Load a boolean TRUE operator

52.1.1.32. loadNewFalse

loadNewFalse()

Load a boolean FALSE operator

52.1.1.33. loadInt

loadInt()

Load an integer operator

52.1.1.34. loadBinInt

loadBinInt()

Load a binary integer operator

52.1.1.35. loadBinInt1

loadBinInt1()

Load the first byte of a binary integer

52.1.1.36. loadBinInt2

loadBinInt2()

Load the second byte of a binary integer

52.1.1.37. loadLong

loadLong()

Load a long (float) operator

52.1.1.38. loadLong1

loadLong1()

Load a one byte long integer

52.1.1.39. loadLong4

loadLong4()

Load a 4 byte long integer

52.1.1.40. loadFloat

loadFloat()

Load a float value

52.1.1.41. loadBinFloat

loadBinFloat()

Load a binary float value

52.1.1.42. loadString

loadString()

Load a string

52.1.1.43. loadBinString

loadBinString()

Load a binary string

52.1.1.44. loadShortBinString

loadShortBinString()

Load a short binary string

52.1.1.45. loadBinBytes

loadBinBytes()

Load arbitrary binary bytes

52.1.1.46. loadShortBinBytes

loadShortBinBytes()

Load a single binary byte

52.1.1.47. loadUnicode

loadUnicode()

Load a unicode string

52.1.1.48. _convertMatchingUnicodeSequence2Utf8

_convertMatchingUnicodeSequence2Utf8()

Convert a unicode sequence to UTF-8

Parameters:array
Return type:string

52.1.1.49. hex2Utf8

hex2Utf8()

Convert a hex string to a UTF-8 string

Parameters:string
Return type:string
Throws :ExceptionRuntimeException on unmatched unicode sequence

52.1.1.50. loadBinUnicode

loadBinUnicode()

Load binary unicode sequence

52.1.1.51. loadMark

loadMark()

Load a marker sequence

52.1.1.52. loadList

loadList()

Load an array (list)

52.1.1.53. loadAppend

loadAppend()

Load an append (to list) sequence

52.1.1.54. loadEmptyList

loadEmptyList()

Load an empty list sequence

52.1.1.55. loadAppends

loadAppends()

Load multiple append (to list) sequences at once

52.1.1.56. loadDict

loadDict()

Load an associative array (Python dictionary)

52.1.1.57. loadSetItem

loadSetItem()

Load an item from a set

52.1.1.58. _loadEmptyDict

_loadEmptyDict()

Load an empty dictionary

52.1.1.59. loadSetItems

loadSetItems()

Load set items

52.1.1.60. loadTuple

loadTuple()

Load a tuple

52.1.1.61. loadTuple1

loadTuple1()

Load single item tuple

52.1.1.62. loadTuple2

loadTuple2()

Load two item tuple

52.1.1.63. loadTuple3

loadTuple3()

Load three item tuple

52.1.1.64. loadProto

loadProto()

Load a proto value

52.1.1.65. read

read()

Read a segment of the pickle

Parameters:mixed
Return type:string
Throws :ExceptionRuntimeException if position matches end of data

52.1.1.66. readline

readline()

Read a line of the pickle at once

Return type:string
Throws :ExceptionRuntimeException if no EOL character found

52.1.1.67. unquoteString

unquoteString()

Unquote/Unescape a quoted string

Parameters:string – quoted string
Return type:string unquoted string

52.1.1.68. lastMarker

lastMarker()

Return last marker position in stack

Return type:int

52.1.1.69. decodeBinLong

decodeBinLong()

Decode a binary long sequence

Parameters:string
Return type:int|float|string

52.1.2. Constants

52.1.2.1. OP_MARK

Pickle opcodes. See pickletools.py for extensive docs.

52.1.2.2. OP_STOP

52.1.2.3. OP_POP

52.1.2.4. OP_POP_MARK

52.1.2.5. OP_DUP

52.1.2.6. OP_FLOAT

52.1.2.7. OP_INT

52.1.2.8. OP_BININT

52.1.2.9. OP_BININT1

52.1.2.10. OP_LONG

52.1.2.11. OP_BININT2

52.1.2.12. OP_NONE

52.1.2.13. OP_PERSID

52.1.2.14. OP_BINPERSID

52.1.2.15. OP_REDUCE

52.1.2.16. OP_STRING

52.1.2.17. OP_BINSTRING

52.1.2.18. OP_SHORT_BINSTRING

52.1.2.19. OP_UNICODE

52.1.2.20. OP_BINUNICODE

52.1.2.21. OP_APPEND

52.1.2.22. OP_BUILD

52.1.2.23. OP_GLOBAL

52.1.2.24. OP_DICT

52.1.2.25. OP_EMPTY_DICT

52.1.2.26. OP_APPENDS

52.1.2.27. OP_GET

52.1.2.28. OP_BINGET

52.1.2.29. OP_INST

52.1.2.30. OP_LONG_BINGET

52.1.2.31. OP_LIST

52.1.2.32. OP_EMPTY_LIST

52.1.2.33. OP_OBJ

52.1.2.34. OP_PUT

52.1.2.35. OP_BINPUT

52.1.2.36. OP_LONG_BINPUT

52.1.2.37. OP_SETITEM

52.1.2.38. OP_TUPLE

52.1.2.39. OP_EMPTY_TUPLE

52.1.2.40. OP_SETITEMS

52.1.2.41. OP_BINFLOAT

52.1.2.42. OP_PROTO

52.1.2.43. OP_NEWOBJ

52.1.2.44. OP_EXT1

52.1.2.45. OP_EXT2

52.1.2.46. OP_EXT4

52.1.2.47. OP_TUPLE1

52.1.2.48. OP_TUPLE2

52.1.2.49. OP_TUPLE3

52.1.2.50. OP_NEWTRUE

52.1.2.51. OP_NEWFALSE

52.1.2.52. OP_LONG1

52.1.2.53. OP_LONG4

52.1.2.54. OP_BINBYTES

52.1.2.55. OP_SHORT_BINBYTES

Project Versions

Table Of Contents

Previous topic

51. Class

Next topic

53. Class

This Page