public function transformObject(ActionViewEvent $event)
    {
        $data = $event->getData();

        if (is_array($data)) {
            $data = new \ArrayObject($data);
        }

        if ($this->normalizerManager->supports($data) && !$this->transformerManager->supports($data)) {
            $objectResponse = new ObjectResponse($data);
            $objectResponse->removeActionTransform();

            $response = $this->doTransformObjectResponse($objectResponse);
            $event->setResponse($response);
        }

        if ($this->transformerManager->supports($data)) {
            $objectResponse = new ObjectResponse($data);

            $response = $this->doTransformObjectResponse($objectResponse);
            $event->setResponse($response);
        }
    }