platform/api/laravel/Queue/Middleware/RateLimited.yaml
2024-09-02 10:44:11 -07:00

120 lines
2.6 KiB
YAML

name: RateLimited
class_comment: null
dependencies:
- name: RateLimiter
type: class
source: Illuminate\Cache\RateLimiter
- name: Unlimited
type: class
source: Illuminate\Cache\RateLimiting\Unlimited
- name: Container
type: class
source: Illuminate\Container\Container
- name: Arr
type: class
source: Illuminate\Support\Arr
properties:
- name: limiter
visibility: protected
comment: '# * The rate limiter instance.
# *
# * @var \Illuminate\Cache\RateLimiter'
- name: limiterName
visibility: protected
comment: '# * The name of the rate limiter.
# *
# * @var string'
- name: shouldRelease
visibility: public
comment: '# * Indicates if the job should be released if the limit is exceeded.
# *
# * @var bool'
methods:
- name: __construct
visibility: public
parameters:
- name: limiterName
comment: "# * The rate limiter instance.\n# *\n# * @var \\Illuminate\\Cache\\RateLimiter\n\
# */\n# protected $limiter;\n# \n# /**\n# * The name of the rate limiter.\n# *\n\
# * @var string\n# */\n# protected $limiterName;\n# \n# /**\n# * Indicates if\
\ the job should be released if the limit is exceeded.\n# *\n# * @var bool\n#\
\ */\n# public $shouldRelease = true;\n# \n# /**\n# * Create a new middleware\
\ instance.\n# *\n# * @param string $limiterName\n# * @return void"
- name: handle
visibility: public
parameters:
- name: job
- name: next
comment: '# * Process the job.
# *
# * @param mixed $job
# * @param callable $next
# * @return mixed'
- name: handleJob
visibility: protected
parameters:
- name: job
- name: next
- name: limits
comment: '# * Handle a rate limited job.
# *
# * @param mixed $job
# * @param callable $next
# * @param array $limits
# * @return mixed'
- name: dontRelease
visibility: public
parameters: []
comment: '# * Do not release the job back to the queue if the limit is exceeded.
# *
# * @return $this'
- name: getTimeUntilNextRetry
visibility: protected
parameters:
- name: key
comment: '# * Get the number of seconds that should elapse before the job is retried.
# *
# * @param string $key
# * @return int'
- name: __sleep
visibility: public
parameters: []
comment: '# * Prepare the object for serialization.
# *
# * @return array'
- name: __wakeup
visibility: public
parameters: []
comment: '# * Prepare the object after unserialization.
# *
# * @return void'
traits:
- Illuminate\Cache\RateLimiter
- Illuminate\Cache\RateLimiting\Unlimited
- Illuminate\Container\Container
- Illuminate\Support\Arr
interfaces: []