src/SerializardFacade.php 1 location
|
@@ 64-73 (lines=10) @@
|
61 |
|
return $this->getFormat($format)->unserialize($var, $class, $this->hydrators); |
62 |
|
} |
63 |
|
|
64 |
|
private function getFormat($alias) |
65 |
|
{ |
66 |
|
$format = $this->formats->get($alias); |
67 |
|
|
68 |
|
if(false === $format instanceof FormatInterface) { |
69 |
|
throw new \RuntimeException(sprintf('No registered format for alias %s!', $alias)); |
70 |
|
} |
71 |
|
|
72 |
|
return $format; |
73 |
|
} |
74 |
|
} |
75 |
|
|
src/Serializard.php 1 location
|
@@ 45-54 (lines=10) @@
|
42 |
|
return $context->withRoot($var)->withFormat($format); |
43 |
|
} |
44 |
|
|
45 |
|
private function getFormat($alias) |
46 |
|
{ |
47 |
|
$format = $this->formats->get($alias); |
48 |
|
|
49 |
|
if(false === $format instanceof FormatInterface) { |
50 |
|
throw new \RuntimeException(sprintf('No registered format for alias %s!', $alias)); |
51 |
|
} |
52 |
|
|
53 |
|
return $format; |
54 |
|
} |
55 |
|
} |
56 |
|
|