PHP 클래스 bandwidthThrottle\tokenBucket\storage\PDOStorage

This storage is in the global scope.
저자: Markus Malkusch ([email protected])
상속: implements bandwidthThrottle\tokenBucket\storage\Storage, implements bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
파일 보기 프로젝트 열기: bandwidth-throttle/token-bucket

공개 메소드들

메소드 설명
__construct ( string $name, PDO $pdo ) Sets the PDO and the bucket's name for the shared storage.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

비공개 메소드들

메소드 설명
forVendor ( array $map, string $default = "" ) : string Returns a vendor specific dialect value.
querySingleValue ( string $sql, array $parameters = [] ) : string Returns one value from a query.

메소드 상세

__construct() 공개 메소드

The name should be the same for all token buckets which share the same token storage. The transaction isolation level should avoid lost updates, i.e. it should be at least Repeatable Read.
public __construct ( string $name, PDO $pdo )
$name string The name of the token bucket.
$pdo PDO The PDO.

bootstrap() 공개 메소드

public bootstrap ( $microtime )

getMicrotime() 공개 메소드

public getMicrotime ( )

getMutex() 공개 메소드

public getMutex ( )

isBootstrapped() 공개 메소드

public isBootstrapped ( )

remove() 공개 메소드

public remove ( )

setMicrotime() 공개 메소드

public setMicrotime ( $microtime )