1 | <?php |
||
10 | final class Base64Value implements Base64 |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $encoded; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $decoded; |
||
21 | |||
22 | /** |
||
23 | * @param string $encoded |
||
24 | * @param string $decoded |
||
25 | */ |
||
26 | 7 | public function __construct($encoded, $decoded) |
|
31 | |||
32 | /** |
||
33 | * Returns new base64 value object by encoded value. |
||
34 | * |
||
35 | * @param string $string |
||
36 | * |
||
37 | * @return self |
||
38 | */ |
||
39 | 1 | public static function serialize($string) |
|
43 | |||
44 | /** |
||
45 | * Returns new base64 value by string. |
||
46 | * |
||
47 | * @param string $value |
||
48 | * |
||
49 | * @return self |
||
50 | */ |
||
51 | 2 | public static function deserialize($value) |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 5 | public function getEncoded() |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 5 | public function getDecoded() |
|
79 | } |
||
80 |