PHP 클래스 bandwidthThrottle\tokenBucket\BlockingConsumer

저자: Markus Malkusch ([email protected])
파일 보기 프로젝트 열기: bandwidth-throttle/token-bucket 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( TokenBucket $bucket ) Set the token bucket.
consume ( integer $tokens ) Consumes tokens.

메소드 상세

__construct() 공개 메소드

Set the token bucket.
public __construct ( TokenBucket $bucket )
$bucket TokenBucket The token bucket.

consume() 공개 메소드

If the underlying token bucket doesn't have sufficient tokens, the consumer blocks until it can consume the tokens.
public consume ( integer $tokens )
$tokens integer The token amount.