Serializable
last analyzed

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
deserialize() 0 1 ?
serialize() 0 1 ?
1
<?php
2
3
namespace OpenConext\Value;
4
5
/**
6
 * Simple interface that allows for (de-)serialization of objects by external serializers
7
 */
8
interface Serializable
9
{
10
    /**
11
     * @param mixed $data the data required to deserialize the data into a new object
12
     * @return static The object instance
13
     */
14
    public static function deserialize($data);
15
16
    /**
17
     * @return mixed a representation of the data that the value object contains. This must be compatible with {@see
18
     *               deserialize}: feeding the data given by serialize into deserialize must recreate an equal object
19
     */
20
    public function serialize();
21
}
22