|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Serializer |
|
17 * @subpackage Adapter |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: AdapterInterface.php 20574 2010-01-24 17:39:14Z mabe $ |
|
21 */ |
|
22 |
|
23 /** |
|
24 * @category Zend |
|
25 * @package Zend_Serializer |
|
26 * @subpackage Adapter |
|
27 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
29 */ |
|
30 interface Zend_Serializer_Adapter_AdapterInterface |
|
31 { |
|
32 /** |
|
33 * Constructor |
|
34 * |
|
35 * @param array|Zend_Config $opts Serializer options |
|
36 * @return void |
|
37 */ |
|
38 public function __construct($opts = array()); |
|
39 |
|
40 /** |
|
41 * Set serializer options |
|
42 * |
|
43 * @param array|Zend_Config $opts Serializer options |
|
44 * @return Zend_Serializer_Adapter_AdapterInterface |
|
45 */ |
|
46 public function setOptions($opts); |
|
47 |
|
48 /** |
|
49 * Set a serializer option |
|
50 * |
|
51 * @param string $name Option name |
|
52 * @param mixed $value Option value |
|
53 * @return Zend_Serializer_Adapter_AdapterInterface |
|
54 */ |
|
55 public function setOption($name, $value); |
|
56 |
|
57 /** |
|
58 * Get serializer options |
|
59 * |
|
60 * @return array |
|
61 */ |
|
62 public function getOptions(); |
|
63 |
|
64 /** |
|
65 * Get a serializer option |
|
66 * |
|
67 * @param string $name |
|
68 * @return mixed |
|
69 * @throws Zend_Serializer_Exception |
|
70 */ |
|
71 public function getOption($name); |
|
72 |
|
73 /** |
|
74 * Generates a storable representation of a value. |
|
75 * |
|
76 * @param mixed $value Data to serialize |
|
77 * @param array $options Serialize options |
|
78 * @return string |
|
79 * @throws Zend_Serializer_Exception |
|
80 */ |
|
81 public function serialize($value, array $options = array()); |
|
82 |
|
83 /** |
|
84 * Creates a PHP value from a stored representation. |
|
85 * |
|
86 * @param string $serialized Serialized string |
|
87 * @param array $options Unserialize options |
|
88 * @return mixed |
|
89 * @throws Zend_Serializer_Exception |
|
90 */ |
|
91 public function unserialize($serialized, array $options = array()); |
|
92 } |