Пример #1
0
 public function __construct(array $options, $enabled = true)
 {
     $this->enabled = $enabled;
     parent::__construct($options);
 }
Пример #2
0
 /**
  * Get the remaining limit before the consumer is rate limited.
  *
  * @return int
  */
 public function getRemainingLimit()
 {
     $remaining = $this->throttle->getLimit() - $this->retrieve('requests');
     return $remaining > 0 ? $remaining : 0;
 }