-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathArrayAdapterInterface.php
More file actions
73 lines (63 loc) · 1.84 KB
/
ArrayAdapterInterface.php
File metadata and controls
73 lines (63 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* This file is part of the Simple Serializer.
*
* Copyright (c) 2012 Farheap Solutions (http://www.farheap.com)
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Opensoft\SimpleSerializer\Adapter;
use Opensoft\SimpleSerializer\Exclusion\ExclusionStrategyInterface;
/**
* @author Dmitry Petrov <dmitry.petrov@opensoftdev.ru>
*/
interface ArrayAdapterInterface
{
/**
* Convert object to array
*
* @abstract
* @param object $object
* @return mixed
*/
public function toArray($object);
/**
* Convert array to object
*
* @abstract
* @param mixed $data
* @param object $object
*/
public function toObject(array $data, $object);
/**
* Sets ExclusionStrategy
* @deprecated Deprecated since version 1.1 to be removed in 2
*
* @param ExclusionStrategyInterface|null $exclusionStrategy
* @return ArrayAdapterInterface
*/
public function setExclusionStrategy(ExclusionStrategyInterface $exclusionStrategy = null);
/**
* @param ExclusionStrategyInterface $exclusionStrategy
* @return ArrayAdapterInterface
*/
public function addExclusionStrategy(ExclusionStrategyInterface $exclusionStrategy);
public function cleanUpExclusionStrategies();
/**
* Sets Unserialized mode
*
* @param boolean $unserializeMode
* @return ArrayAdapterInterface
*/
public function setUnserializeMode($unserializeMode);
/**
* Convert array to object of given classname
* This method implies that class constructor is public and does not require any parameters
*
* @abstract
* @param mixed $data
* @param string $className
*/
public function toObjectOfClass(array $data, $className);
}