Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Serializer / Adapter / PythonPickleOptions.php
blob82e46900c30d9f4ce0447b146c46849f51bc23cd
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Serializer\Adapter;
12 use Zend\Serializer\Exception;
14 class PythonPickleOptions extends AdapterOptions
16 /**
17 * Pickle protocol version to serialize data
19 * @var int
21 protected $protocol = 0;
23 /**
24 * Set pickle protocol version to serialize data
26 * Supported versions are 0, 1, 2 and 3
28 * @param int $protocol
29 * @return PythonPickleOptions
30 * @throws Exception\InvalidArgumentException
32 public function setProtocol($protocol)
34 $protocol = (int) $protocol;
35 if ($protocol < 0 || $protocol > 3) {
36 throw new Exception\InvalidArgumentException(
37 "Invalid or unknown protocol version '{$protocol}'"
41 $this->protocol = $protocol;
43 return $this;
46 /**
47 * Get pickle protocol version to serialize data
49 * @return int
51 public function getProtocol()
53 return $this->protocol;