PHP Класс ApiPlatform\Core\EventListener\AddFormatListener

Автор: Kévin Dunglas ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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