Serializer/Adapter/PythonPickle.php

Show: PublicProtectedPrivateinherited
Table of Contents
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

>VConstant  OP_MARK = '('
>VConstant  OP_STOP = '.'
>VConstant  OP_POP = '0'
>VConstant  OP_POP_MARK = '1'
>VConstant  OP_DUP = '2'
>VConstant  OP_FLOAT = 'F'
>VConstant  OP_INT = 'I'
>VConstant  OP_BININT = 'J'
>VConstant  OP_BININT1 = 'K'
>VConstant  OP_LONG = 'L'
>VConstant  OP_BININT2 = 'M'
>VConstant  OP_NONE = 'N'
>VConstant  OP_PERSID = 'P'
>VConstant  OP_BINPERSID = 'Q'
>VConstant  OP_REDUCE = 'R'
>VConstant  OP_STRING = 'S'
>VConstant  OP_BINSTRING = 'T'
>VConstant  OP_SHORT_BINSTRING = 'U'
>VConstant  OP_UNICODE = 'V'
>VConstant  OP_BINUNICODE = 'X'
>VConstant  OP_APPEND = 'a'
>VConstant  OP_BUILD = 'b'
>VConstant  OP_GLOBAL = 'c'
>VConstant  OP_DICT = 'd'
>VConstant  OP_EMPTY_DICT = '}'
>VConstant  OP_APPENDS = 'e'
>VConstant  OP_GET = 'g'
>VConstant  OP_BINGET = 'h'
>VConstant  OP_INST = 'i'
>VConstant  OP_LONG_BINGET = 'j'
>VConstant  OP_LIST = 'l'
>VConstant  OP_EMPTY_LIST = ']'
>VConstant  OP_OBJ = 'o'
>VConstant  OP_PUT = 'p'
>VConstant  OP_BINPUT = 'q'
>VConstant  OP_LONG_BINPUT = 'r'
>VConstant  OP_SETITEM = 's'
>VConstant  OP_TUPLE = 't'
>VConstant  OP_EMPTY_TUPLE = ')'
>VConstant  OP_SETITEMS = 'u'
>VConstant  OP_BINFLOAT = 'G'
>VConstant  OP_PROTO = "\x80"
>VConstant  OP_NEWOBJ = "\x81"
>VConstant  OP_EXT1 = "\x82"
>VConstant  OP_EXT2 = "\x83"
>VConstant  OP_EXT4 = "\x84"
>VConstant  OP_TUPLE1 = "\x85"
>VConstant  OP_TUPLE2 = "\x86"
>VConstant  OP_TUPLE3 = "\x87"
>VConstant  OP_NEWTRUE = "\x88"
>VConstant  OP_NEWFALSE = "\x89"
>VConstant  OP_LONG1 = "\x8a"
>VConstant  OP_LONG4 = "\x8b"
>VConstant  OP_BINBYTES = 'B'
>VConstant  OP_SHORT_BINBYTES = 'C'

Properties

Methods

methodpublic__construct( $opts = array()) : void

Constructor

Parameters
NameTypeDescription
$opts
Details
Link
Zend_Serializer_Adapter_AdapterAbstract::__construct()  
methodpublicserialize(mixed $value, array $opts = array()) : string

Serialize PHP to PythonPickle format

Parameters
NameTypeDescription
$valuemixed
$optsarray
Returns
TypeDescription
string
methodpublicsetOption(string $name, mixed $value) : \Zend_Serializer_Adapter_PythonPickle

Set an option

Parameters
NameTypeDescription
$namestring
$valuemixed
Returns
TypeDescription
\Zend_Serializer_Adapter_PythonPickle
Details
Link
Zend_Serializer_Adapter_AdapterAbstract::setOption()  
methodpublicunserialize(string $pickle, array $opts = array()) : mixed

Unserialize from Python Pickle format to PHP

Parameters
NameTypeDescription
$picklestring
$optsarray
Returns
TypeDescription
mixed
Throws
ExceptionDescription
\Zend_Serializer_Exceptionon invalid Pickle string
Documentation was generated by phpDocumentor 2.2.0 .