예제 #1
0
 public function __construct(array $options, $enabled = true)
 {
     $this->enabled = $enabled;
     parent::__construct($options);
 }
예제 #2
0
파일: Handler.php 프로젝트: riclt/api
 /**
  * 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;
 }