Phprest\Service\Hateoas\Util::deserialize PHP Method

deserialize() protected method

protected deserialize ( string $type, Request $request ) : mixed
$type string
$request Symfony\Component\HttpFoundation\Request
return mixed
    protected function deserialize($type, Request $request)
    {
        $mimeProcResult = $this->processMime($request->headers->get('Content-Type'));
        if (is_null($mimeProcResult->format)) {
            throw new Exception\UnsupportedMediaType();
        }
        return $this->serviceHateoas()->getSerializer()->deserialize($request->getContent(), $type, $mimeProcResult->format, DeserializationContext::create()->setVersion($mimeProcResult->apiVersion));
    }