PHP 클래스 ApiPlatform\Core\EventListener\SerializeListener

저자: Kévin Dunglas ([email protected])
파일 보기 프로젝트 열기: api-platform/core 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Symfony\Component\Serializer\SerializerInterface $serializer, ApiPlatform\Core\Serializer\SerializerContextBuilderInterface $serializerContextBuilder )
onKernelView ( GetResponseForControllerResultEvent $event ) Serializes the data to the requested format.

비공개 메소드들

메소드 설명
serializeRawData ( GetResponseForControllerResultEvent $event, Request $request, object $controllerResult ) Tries to serialize data that are not API resources (e.g. the entrypoint or data returned by a custom controller).

메소드 상세

__construct() 공개 메소드

public __construct ( Symfony\Component\Serializer\SerializerInterface $serializer, ApiPlatform\Core\Serializer\SerializerContextBuilderInterface $serializerContextBuilder )
$serializer Symfony\Component\Serializer\SerializerInterface
$serializerContextBuilder ApiPlatform\Core\Serializer\SerializerContextBuilderInterface

onKernelView() 공개 메소드

Serializes the data to the requested format.
public onKernelView ( GetResponseForControllerResultEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent