examples/ratelimit/ratelimit.php
protected function _getBucketName($time = null) {
		$time = $time ? : time();
		return (int) floor(($time % $this->_bucketSpan) / $this->_bucketInterval);
	}
protected function _getBucketName($time = null) {
		$time = $time ? : time();
		return (int) floor(($time % $this->_bucketSpan) / $this->_bucketInterval);
	}
Get the bucket associated with the current time.

@param int $time (optional) - default is the current time (seconds since epoch)
@return int bucket