File indexing completed on 2024-12-22 05:37:00
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Serializer 0017 * @subpackage Adapter 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * @category Zend 0025 * @package Zend_Serializer 0026 * @subpackage Adapter 0027 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0028 * @license http://framework.zend.com/license/new-bsd New BSD License 0029 */ 0030 interface Zend_Serializer_Adapter_AdapterInterface 0031 { 0032 /** 0033 * Constructor 0034 * 0035 * @param array|Zend_Config $opts Serializer options 0036 * @return void 0037 */ 0038 public function __construct($opts = array()); 0039 0040 /** 0041 * Set serializer options 0042 * 0043 * @param array|Zend_Config $opts Serializer options 0044 * @return Zend_Serializer_Adapter_AdapterInterface 0045 */ 0046 public function setOptions($opts); 0047 0048 /** 0049 * Set a serializer option 0050 * 0051 * @param string $name Option name 0052 * @param mixed $value Option value 0053 * @return Zend_Serializer_Adapter_AdapterInterface 0054 */ 0055 public function setOption($name, $value); 0056 0057 /** 0058 * Get serializer options 0059 * 0060 * @return array 0061 */ 0062 public function getOptions(); 0063 0064 /** 0065 * Get a serializer option 0066 * 0067 * @param string $name 0068 * @return mixed 0069 * @throws Zend_Serializer_Exception 0070 */ 0071 public function getOption($name); 0072 0073 /** 0074 * Generates a storable representation of a value. 0075 * 0076 * @param mixed $value Data to serialize 0077 * @param array $options Serialize options 0078 * @return string 0079 * @throws Zend_Serializer_Exception 0080 */ 0081 public function serialize($value, array $options = array()); 0082 0083 /** 0084 * Creates a PHP value from a stored representation. 0085 * 0086 * @param string $serialized Serialized string 0087 * @param array $options Unserialize options 0088 * @return mixed 0089 * @throws Zend_Serializer_Exception 0090 */ 0091 public function unserialize($serialized, array $options = array()); 0092 }