PHP 클래스 ApiPlatform\Core\EventListener\AddFormatListener

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

공개 메소드들

메소드 설명
__construct ( Negotiator $negotiator, array $formats )
onKernelRequest ( GetResponseEvent $event ) Sets the applicable format to the HttpFoundation Request.

비공개 메소드들

메소드 설명
addRequestFormats ( Request $request, array $formats ) Adds API formats to the HttpFoundation Request.
getNotAcceptableHttpException ( string $accept, array $mimeTypes = null ) : Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException Retrieves an instance of NotAcceptableHttpException.
populateMimeTypes ( ) Populates the $mimeTypes property.

메소드 상세

__construct() 공개 메소드

public __construct ( Negotiator $negotiator, array $formats )
$negotiator Negotiation\Negotiator
$formats array

onKernelRequest() 공개 메소드

Sets the applicable format to the HttpFoundation Request.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent