Reference
C
Class

ApiPlatform\Doctrine\EventListener\PublishMercureUpdatesListener

Publishes resources updates to the Mercure hub.

class ApiPlatform\Doctrine\EventListener\PublishMercureUpdatesListener
{
    public __construct(ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, Symfony\Component\Serializer\SerializerInterface $serializer, array<string, array<int, string>
string> $formats, null|Symfony\Component\Messenger\MessageBusInterface $messageBus, null|Symfony\Component\Mercure\HubRegistry $hubRegistry, null|ApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface $graphQlSubscriptionManager, null|ApiPlatform\GraphQl\Subscription\MercureSubscriptionIriGeneratorInterface $graphQlMercureSubscriptionIriGenerator, null|Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage, bool $includeType)
    public onFlush(Doctrine\Common\EventArgs $eventArgs): null
    public postFlush(): null
}
class ApiPlatform\Doctrine\EventListener\PublishMercureUpdatesListener
{
    public __construct(ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, Symfony\Component\Serializer\SerializerInterface $serializer, array<string, array<int, string>
string> $formats, null|Symfony\Component\Messenger\MessageBusInterface $messageBus, null|Symfony\Component\Mercure\HubRegistry $hubRegistry, null|ApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface $graphQlSubscriptionManager, null|ApiPlatform\GraphQl\Subscription\MercureSubscriptionIriGeneratorInterface $graphQlMercureSubscriptionIriGenerator, null|Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage, bool $includeType)
    public onFlush(Doctrine\Common\EventArgs $eventArgs): null
    public postFlush(): null
}

Methods

__construct

public __construct(ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, Symfony\Component\Serializer\SerializerInterface $serializer, array<string, array<int, string>
string> $formats, null|Symfony\Component\Messenger\MessageBusInterface $messageBus, null|Symfony\Component\Mercure\HubRegistry $hubRegistry, null|ApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface $graphQlSubscriptionManager, null|ApiPlatform\GraphQl\Subscription\MercureSubscriptionIriGeneratorInterface $graphQlMercureSubscriptionIriGenerator, null|Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage, bool $includeType)
public __construct(ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, Symfony\Component\Serializer\SerializerInterface $serializer, array<string, array<int, string>
string> $formats, null|Symfony\Component\Messenger\MessageBusInterface $messageBus, null|Symfony\Component\Mercure\HubRegistry $hubRegistry, null|ApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface $graphQlSubscriptionManager, null|ApiPlatform\GraphQl\Subscription\MercureSubscriptionIriGeneratorInterface $graphQlMercureSubscriptionIriGenerator, null|Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage, bool $includeType)

Parameters

resourceClassResolverApiPlatform\Api\ResourceClassResolverInterface
iriConverterApiPlatform\Api\IriConverterInterface
resourceMetadataFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface
serializerSymfony\Component\Serializer\SerializerInterface
formatsarray<string, array<int, string> string>
messageBusSymfony\Component\Messenger\MessageBusInterface
hubRegistrySymfony\Component\Mercure\HubRegistry
graphQlSubscriptionManagerApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface
graphQlMercureSubscriptionIriGeneratorApiPlatform\GraphQl\Subscription\MercureSubscriptionIriGeneratorInterface
expressionLanguageSymfony\Component\ExpressionLanguage\ExpressionLanguage
includeTypebool

onFlush

Collects created, updated and deleted objects.

public onFlush(Doctrine\Common\EventArgs $eventArgs): null
public onFlush(Doctrine\Common\EventArgs $eventArgs): null

Parameters

eventArgsDoctrine\Common\EventArgs

Returns

null

postFlush

Publishes updates for changes collected on flush, and resets the store.

public postFlush(): null
public postFlush(): null

Returns

null

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop