From a06cce6b54c1eb5abb5fbdac91fa444fe33c4029 Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 5 Oct 2016 21:48:44 +0200 Subject: [PATCH] Fix classname --- src/Api/ThrottleMiddleware.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Api/ThrottleMiddleware.php b/src/Api/ThrottleMiddleware.php index 505e109..1cc0222 100644 --- a/src/Api/ThrottleMiddleware.php +++ b/src/Api/ThrottleMiddleware.php @@ -3,8 +3,11 @@ namespace EmotionHero\Api; use Exception; +use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; +use TokenBucket\Storage\PDO; +use TokenBucket\TokenBucket; /** * Description of ThrottleMiddleware @@ -45,7 +48,7 @@ class ThrottleMiddleware implements HttpKernelInterface if($limit_requests) { - $storage = new PDOStorage($this->options['pdo']); + $storage = new PDO($this->options['pdo']); // Define the bucket $bucket_options = array( 'capacity' => $tokens,