protected function normalizeObject($object, $format, array $context)
    {
        if (!$this->serializer instanceof NormalizerInterface) {
            throw new LogicException(
                'Cannot normalize object because the injected serializer is not a normalizer'
            );
        }

        return $this->serializer->normalize($object, $format, $context);
    }
protected function normalizeObject($object, $format, array $context)
    {
        if (!$this->serializer instanceof NormalizerInterface) {
            throw new LogicException(
                'Cannot normalize object because the injected serializer is not a normalizer'
            );
        }

        return $this->serializer->normalize($object, $format, $context);
    }
protected function normalizeObject ( $ object , $ format , array $ context ) { if ( ! $ this -> serializer instanceof NormalizerInterface ) { throw new LogicException ( 'Cannot normalize object because the injected serializer is not a normalizer' ) ; } return $ this -> serializer -> normalize ( $ object , $ format , $ context ) ; }
Normalizes the object.

@param object $object
@param string $format
@param array  $context

@return array|string
Normalizes the object .