![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/vendor/noxlogic/ratelimit-bundle/Annotation/ |
<?php namespace Noxlogic\RateLimitBundle\Annotation; use Doctrine\Common\Annotations\Annotation; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation; /** * @Annotation * @Target({"METHOD", "CLASS"}) */ class RateLimit extends ConfigurationAnnotation { /** * @var array HTTP Methods protected by this annotation. Defaults to all method */ protected $methods = array(); /** * @var int Number of calls per period */ protected $limit = -1; /** * @var int Number of seconds of the time period in which the calls can be made */ protected $period = 3600; /** * @var mixed Generic payload */ protected $payload; /** * Returns the alias name for an annotated configuration. * * @return string */ public function getAliasName() { return "x-rate-limit"; } /** * Returns whether multiple annotations of this type are allowed * * @return Boolean */ public function allowArray() { return true; } /** * @return int */ public function getLimit() { return $this->limit; } /** * @param int $limit */ public function setLimit($limit) { $this->limit = $limit; } /** * @return array */ public function getMethods() { return $this->methods; } /** * @param array $methods */ public function setMethods($methods) { $this->methods = (array) $methods; } /** * @return int */ public function getPeriod() { return $this->period; } /** * @param int $period */ public function setPeriod($period) { $this->period = $period; } /** * @return mixed */ public function getPayload() { return $this->payload; } /** * @param mixed $payload */ public function setPayload($payload) { $this->payload = $payload; } }