RateLimiter.php 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static \Illuminate\Cache\RateLimiter for(string $name, \Closure $callback)
  5. * @method static \Closure|null limiter(string $name)
  6. * @method static mixed attempt(string $key, int $maxAttempts, \Closure $callback, int $decaySeconds = 60)
  7. * @method static bool tooManyAttempts(string $key, int $maxAttempts)
  8. * @method static int hit(string $key, int $decaySeconds = 60)
  9. * @method static int increment(string $key, int $decaySeconds = 60, int $amount = 1)
  10. * @method static mixed attempts(string $key)
  11. * @method static mixed resetAttempts(string $key)
  12. * @method static int remaining(string $key, int $maxAttempts)
  13. * @method static int retriesLeft(string $key, int $maxAttempts)
  14. * @method static void clear(string $key)
  15. * @method static int availableIn(string $key)
  16. * @method static string cleanRateLimiterKey(string $key)
  17. *
  18. * @see \Illuminate\Cache\RateLimiter
  19. */
  20. class RateLimiter extends Facade
  21. {
  22. /**
  23. * Get the registered name of the component.
  24. *
  25. * @return string
  26. */
  27. protected static function getFacadeAccessor()
  28. {
  29. return \Illuminate\Cache\RateLimiter::class;
  30. }
  31. }