src/Serializer/AbstractItemNormalizer.php
protected function transformOutput($object, array $context = [])
    {
        $outputClass = $this->getOutputClass($this->getObjectClass($object), $context);
        if (null !== $outputClass && null !== $dataTransformer = $this->getDataTransformer($object, $outputClass, $context)) {
            return $dataTransformer->transform($object, $outputClass, $context);
        }

        return $object;
    }
protected function transformOutput($object, array $context = [])
    {
        $outputClass = $this->getOutputClass($this->getObjectClass($object), $context);
        if (null !== $outputClass && null !== $dataTransformer = $this->getDataTransformer($object, $outputClass, $context)) {
            return $dataTransformer->transform($object, $outputClass, $context);
        }

        return $object;
    }
protected function transformOutput ( $ object , array $ context = [ ] ) { $ outputClass = $ this -> getOutputClass ( $ this -> getObjectClass ( $ object ) , $ context ) ; if ( null !== $ outputClass && null !== $ dataTransformer = $ this -> getDataTransformer ( $ object , $ outputClass , $ context ) ) { return $ dataTransformer -> transform ( $ object , $ outputClass , $ context ) ; } return $ object ; }
For a given resource, it returns an output representation if any
If not, the resource is returned.
For a given resource it returns an output representation if any If not the resource is returned .