src/Serializard.php 1 location
|
@@ 36-45 (lines=10) @@
|
| 33 |
|
return $this->getFormat($format)->unserialize($var, $class, $this->hydrators); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
private function getFormat($alias) |
| 37 |
|
{ |
| 38 |
|
$format = $this->formats->get($alias); |
| 39 |
|
|
| 40 |
|
if(false === $format instanceof FormatInterface) { |
| 41 |
|
throw new \RuntimeException(sprintf('No registered format for alias %s!', $alias)); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
return $format; |
| 45 |
|
} |
| 46 |
|
} |
| 47 |
|
|
src/SerializardFacade.php 1 location
|
@@ 63-72 (lines=10) @@
|
| 60 |
|
return $this->getFormat($format)->unserialize($var, $class, $this->hydrators); |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
private function getFormat($alias) |
| 64 |
|
{ |
| 65 |
|
$format = $this->formats->get($alias); |
| 66 |
|
|
| 67 |
|
if(false === $format instanceof FormatInterface) { |
| 68 |
|
throw new \RuntimeException(sprintf('No registered format for alias %s!', $alias)); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
return $format; |
| 72 |
|
} |
| 73 |
|
} |
| 74 |
|
|