Serializer/Adapter/PythonPickle.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Serializer
- Subpackage
- Adapter
- Version
- $Id$
\Zend_Serializer_Adapter_PythonPickle
Package: Zend_Serializer\Adapter- Parent(s)
- \Zend_Serializer_Adapter_AdapterAbstract
- See
-
- See
-
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Link
- http://www.python.org
- Link
- http://pickle-js.googlecode.com
Constants
Properties
$_binary = false
Default valuefalse
Details- Type
- n/a
bool $_isLittleEndian = null
staticWhether or not the system is little-endian
Default valuenull
Details- Type
- bool
bool $_isPhp6 = null
staticWhether or not this is a PHP 6 binary
Default valuenull
Details- Type
- bool
$_marker = null
Default valuenull
Details- Type
- n/a
$_memo = array()
Default valuearray()
Details- Type
- n/a
$_pickle = ''
Default value''
Details- Type
- n/a
$_pickleLen = 0
Default value0
Details- Type
- n/a
$_pos = 0
Default value0
Details- Type
- n/a
$_protocol = 0
Default value0
Details- Type
- n/a
array $_quoteString = 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')
staticStrings representing quotes
Default valuearray('\\' => '\\\\', "\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')
Details- Type
- array
$_stack = array()
Default valuearray()
Details- Type
- n/a
Methods
_checkProtocolNumber(int $number) : int
Check and normalize pickle protocol number
ParametersName | Type | Description |
---|
$number | int | |
---|
ReturnsThrows _convertMatchingUnicodeSequence2Utf8(array $match) : string
Convert a unicode sequence to UTF-8
ParametersName | Type | Description |
---|
$match | array | |
---|
Returns _decodeBinLong(string $data) : int | float | string
Decode a binary long sequence
ParametersName | Type | Description |
---|
$data | string | |
---|
ReturnsType | Description |
---|
int | float | string | |
_momorize(mixed $value) : void
Add a value to the memo and write the id
ParametersName | Type | Description |
---|
$value | mixed | |
---|
_read(mixed $len) : string
Read a segment of the pickle
ParametersName | Type | Description |
---|
$len | mixed | |
---|
ReturnsThrows _searchMomo(mixed $value) : int | false
Search a value in the meno and return the id
ParametersName | Type | Description |
---|
$value | mixed | |
---|
ReturnsType | Description |
---|
int | false | The id or false |
_unquoteString(string $str) : string
Unquote/Unescape a quoted string
ParametersName | Type | Description |
---|
$str | string | quoted string |
---|
ReturnsType | Description |
---|
string | unquoted string |
_writeArrayDict(array $value) : void
Write an associative array value as dictionary
ParametersName | Type | Description |
---|
$value | array | |
---|
_writeArrayList(array $value) : void
Write a simple array value as list
ParametersName | Type | Description |
---|
$value | array | |
---|
_writeGet(int $id) : void
ParametersName | Type | Description |
---|
$id | int | Id of memo |
---|
_writeObject(object $value) : void
Write an object as an dictionary
ParametersName | Type | Description |
---|
$value | object | |
---|
_writePut(int $id) : void
ParametersName | Type | Description |
---|
$id | int | Id of memo |
---|
serialize(mixed $value, array $opts = array()) : string
Serialize PHP to PythonPickle format
ParametersName | Type | Description |
---|
$value | mixed | |
---|
$opts | array | |
---|
Returns unserialize(string $pickle, array $opts = array()) : mixed
Unserialize from Python Pickle format to PHP
ParametersName | Type | Description |
---|
$pickle | string | |
---|
$opts | array | |
---|
ReturnsThrows