Reference
C
Class

ApiPlatform\Hydra\EventListener\AddLinkHeaderListener

Adds the HTTP Link header pointing to the Hydra documentation.

class ApiPlatform\Hydra\EventListener\AddLinkHeaderListener
{
    public __construct(ApiPlatform\Api\UrlGeneratorInterface $urlGenerator)
    public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
    public isPreflightRequest(Symfony\Component\HttpFoundation\Request $request): bool
}
class ApiPlatform\Hydra\EventListener\AddLinkHeaderListener
{
    public __construct(ApiPlatform\Api\UrlGeneratorInterface $urlGenerator)
    public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
    public isPreflightRequest(Symfony\Component\HttpFoundation\Request $request): bool
}

Methods

__construct

public __construct(ApiPlatform\Api\UrlGeneratorInterface $urlGenerator)
public __construct(ApiPlatform\Api\UrlGeneratorInterface $urlGenerator)

Parameters

urlGeneratorApiPlatform\Api\UrlGeneratorInterface

onKernelResponse

Sends the Hydra header on each response.

public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null

Parameters

eventSymfony\Component\HttpKernel\Event\ResponseEvent

Returns

null

isPreflightRequest

public isPreflightRequest(Symfony\Component\HttpFoundation\Request $request): bool
public isPreflightRequest(Symfony\Component\HttpFoundation\Request $request): bool

Parameters

requestSymfony\Component\HttpFoundation\Request

Returns

bool

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop