InterNations\Component\HttpMock\Util::deserialize PHP Method

deserialize() public static method

public static deserialize ( $string )
    public static function deserialize($string)
    {
        $result = static::silentDeserialize($string);
        if ($result === false) {
            throw new UnexpectedValueException('Cannot deserialize string');
        }
        return $result;
    }

Usage Example

 public function read(Request $request, $name)
 {
     $fileName = $this->getFileName($request, $name);
     if (!file_exists($fileName)) {
         return [];
     }
     return Util::deserialize(file_get_contents($fileName));
 }
All Usage Examples Of InterNations\Component\HttpMock\Util::deserialize