public static function toDeserializationContext(array $context): DeserializationContext
    {
        $ctx = new DeserializationContext();

        if (isset($context['object_to_populate'])) {
            $ctx->setAttribute('target', $context['object_to_populate']);
        }

        if (isset($context['groups'])) {
            $ctx->setGroups($context['groups']);
        }

        return $ctx;
    }
public static function toDeserializationContext(array $context): DeserializationContext
    {
        $ctx = new DeserializationContext();

        if (isset($context['object_to_populate'])) {
            $ctx->setAttribute('target', $context['object_to_populate']);
        }

        if (isset($context['groups'])) {
            $ctx->setGroups($context['groups']);
        }

        return $ctx;
    }
public static function toDeserializationContext ( array $ context ) : DeserializationContext { $ ctx = new DeserializationContext ( ) ; if ( isset ( $ context [ 'object_to_populate' ] ) ) { $ ctx -> setAttribute ( 'target' , $ context [ 'object_to_populate' ] ) ; } if ( isset ( $ context [ 'groups' ] ) ) { $ ctx -> setGroups ( $ context [ 'groups' ] ) ; } return $ ctx ; }
Converts to DeserializationContext.

@param array $context

@return DeserializationContext
Converts to DeserializationContext .