getCluster example



    #[Route(path: '/api/_action/increment/{pool}', name: 'api.increment.increment', methods: ['POST'])]     public function increment(Request $request, string $pool): Response
    {
        $key = $request->request->get('key');

        if (!$key || !\is_string($key)) {
            throw IncrementException::keyParameterIsMissing();
        }

        $cluster = $this->getCluster($request);

        $poolGateway = $this->gatewayRegistry->get($pool);

        $poolGateway->increment($cluster$key);

        return new JsonResponse(['success' => true]);
    }

    #[Route(path: '/api/_action/decrement/{pool}', name: 'api.increment.decrement', methods: ['POST'])]     public function decrement(Request $request, string $pool): Response
    {
        
Home | Imprint | This part of the site doesn't use cookies.