PHP 클래스 Cartalyst\Sentinel\Throttling\IlluminateThrottleRepository

상속: implements Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface, use trait Cartalyst\Support\Traits\RepositoryTrait
파일 보기 프로젝트 열기: cartalyst/sentinel

보호된 프로퍼티들

프로퍼티 타입 설명
$globalInterval integer The interval which failed logins are checked, to prevent brute force.
$globalThresholds integer | array If an array is set, the key is the number of failed login attempts and the value is the delay in seconds before another login can occur. If an integer is set, it represents the number of attempts before throttling locks out in the current interval.
$globalThrottles Illuminate\Database\Eloquent\Collection Cached global throttles collection within the interval.
$ipInterval integer The interval at which point one IP address' failed logins are checked.
$ipThresholds integer | array Works identical to global thresholds, except specific to an IP address.
$ipThrottles array The cached IP address throttle collections within the interval.
$userInterval integer The interval at which point failed logins for one user are checked.
$userThresholds integer | array Works identical to global and IP address thresholds, regarding a user.
$userThrottles Illuminate\Database\Eloquent\Collection The cached user throttle collections within the interval.

공개 메소드들

메소드 설명
__construct ( string $model = 'Cartalyst\Sentinel\Throttling\EloquentThrottle', integer $globalInterval = null, integer | array $globalThresholds = null, integer $ipInterval = null, integer | array $ipThresholds = null, integer $userInterval = null, integer | array $userThresholds = null ) : void Create a new Illuminate throttle repository.
getGlobalInterval ( ) : integer Returns the global interval.
getGlobalThresholds ( ) : integer | array Returns the global thresholds.
getIpInterval ( ) : integer Returns the IP address interval.
getIpThresholds ( ) : integer | array Returns the IP address thresholds.
getUserInterval ( ) : integer Returns the user interval.
getUserThresholds ( ) : integer | array Returns the user thresholds.
globalDelay ( ) {@inheritDoc}
ipDelay ( $ipAddress ) {@inheritDoc}
log ( $ipAddress = null, Cartalyst\Sentinel\Users\UserInterface $user = null ) {@inheritDoc}
setGlobalInterval ( integer $globalInterval ) : void Sets the global interval.
setGlobalThresholds ( integer | array $globalThresholds ) : void Sets the global thresholds.
setIpInterval ( integer $ipInterval ) : void Sets the IP address interval.
setIpThresholds ( integer | array $ipThresholds ) : void Sets the IP address thresholds.
setUserInterval ( integer $userInterval ) : void Sets the user interval.
setUserThresholds ( integer | array $userThresholds ) : void Sets the user thresholds.
userDelay ( Cartalyst\Sentinel\Users\UserInterface $user ) {@inheritDoc}

보호된 메소드들

메소드 설명
delay ( string $type, mixed $argument = null ) : integer Returns a delay for the given type.
getGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection Returns the global throttles collection.
getIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection Returns the IP address throttles collection.
getUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection Returns the user throttles collection.
loadGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection Loads and returns the global throttles collection.
loadIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection Loads and returns the IP address throttles collection.
loadUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection Loads and returns the user throttles collection.
secondsToFree ( EloquentThrottle $throttle, integer $interval ) : integer Returns the seconds to free based on the given throttle and the presented delay in seconds, by comparing it to now.

메소드 상세

__construct() 공개 메소드

Create a new Illuminate throttle repository.
public __construct ( string $model = 'Cartalyst\Sentinel\Throttling\EloquentThrottle', integer $globalInterval = null, integer | array $globalThresholds = null, integer $ipInterval = null, integer | array $ipThresholds = null, integer $userInterval = null, integer | array $userThresholds = null ) : void
$model string
$globalInterval integer
$globalThresholds integer | array
$ipInterval integer
$ipThresholds integer | array
$userInterval integer
$userThresholds integer | array
리턴 void

delay() 보호된 메소드

Returns a delay for the given type.
protected delay ( string $type, mixed $argument = null ) : integer
$type string
$argument mixed
리턴 integer

getGlobalInterval() 공개 메소드

Returns the global interval.
public getGlobalInterval ( ) : integer
리턴 integer

getGlobalThresholds() 공개 메소드

Returns the global thresholds.
public getGlobalThresholds ( ) : integer | array
리턴 integer | array

getGlobalThrottles() 보호된 메소드

Returns the global throttles collection.
protected getGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection

getIpInterval() 공개 메소드

Returns the IP address interval.
public getIpInterval ( ) : integer
리턴 integer

getIpThresholds() 공개 메소드

Returns the IP address thresholds.
public getIpThresholds ( ) : integer | array
리턴 integer | array

getIpThrottles() 보호된 메소드

Returns the IP address throttles collection.
protected getIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection
$ipAddress string
리턴 Illuminate\Database\Eloquent\Collection

getUserInterval() 공개 메소드

Returns the user interval.
public getUserInterval ( ) : integer
리턴 integer

getUserThresholds() 공개 메소드

Returns the user thresholds.
public getUserThresholds ( ) : integer | array
리턴 integer | array

getUserThrottles() 보호된 메소드

Returns the user throttles collection.
protected getUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection
$user Cartalyst\Sentinel\Users\UserInterface
리턴 Illuminate\Database\Eloquent\Collection

globalDelay() 공개 메소드

{@inheritDoc}
public globalDelay ( )

ipDelay() 공개 메소드

{@inheritDoc}
public ipDelay ( $ipAddress )

loadGlobalThrottles() 보호된 메소드

Loads and returns the global throttles collection.
protected loadGlobalThrottles ( ) : Illuminate\Database\Eloquent\Collection
리턴 Illuminate\Database\Eloquent\Collection

loadIpThrottles() 보호된 메소드

Loads and returns the IP address throttles collection.
protected loadIpThrottles ( string $ipAddress ) : Illuminate\Database\Eloquent\Collection
$ipAddress string
리턴 Illuminate\Database\Eloquent\Collection

loadUserThrottles() 보호된 메소드

Loads and returns the user throttles collection.
protected loadUserThrottles ( Cartalyst\Sentinel\Users\UserInterface $user ) : Illuminate\Database\Eloquent\Collection
$user Cartalyst\Sentinel\Users\UserInterface
리턴 Illuminate\Database\Eloquent\Collection

log() 공개 메소드

{@inheritDoc}
public log ( $ipAddress = null, Cartalyst\Sentinel\Users\UserInterface $user = null )
$user Cartalyst\Sentinel\Users\UserInterface

secondsToFree() 보호된 메소드

Returns the seconds to free based on the given throttle and the presented delay in seconds, by comparing it to now.
protected secondsToFree ( EloquentThrottle $throttle, integer $interval ) : integer
$throttle EloquentThrottle
$interval integer
리턴 integer

setGlobalInterval() 공개 메소드

Sets the global interval.
public setGlobalInterval ( integer $globalInterval ) : void
$globalInterval integer
리턴 void

setGlobalThresholds() 공개 메소드

Sets the global thresholds.
public setGlobalThresholds ( integer | array $globalThresholds ) : void
$globalThresholds integer | array
리턴 void

setIpInterval() 공개 메소드

Sets the IP address interval.
public setIpInterval ( integer $ipInterval ) : void
$ipInterval integer
리턴 void

setIpThresholds() 공개 메소드

Sets the IP address thresholds.
public setIpThresholds ( integer | array $ipThresholds ) : void
$ipThresholds integer | array
리턴 void

setUserInterval() 공개 메소드

Sets the user interval.
public setUserInterval ( integer $userInterval ) : void
$userInterval integer
리턴 void

setUserThresholds() 공개 메소드

Sets the user thresholds.
public setUserThresholds ( integer | array $userThresholds ) : void
$userThresholds integer | array
리턴 void

userDelay() 공개 메소드

{@inheritDoc}
public userDelay ( Cartalyst\Sentinel\Users\UserInterface $user )
$user Cartalyst\Sentinel\Users\UserInterface

프로퍼티 상세

$globalInterval 보호되어 있는 프로퍼티

The interval which failed logins are checked, to prevent brute force.
protected int $globalInterval
리턴 integer

$globalThresholds 보호되어 있는 프로퍼티

If an array is set, the key is the number of failed login attempts and the value is the delay in seconds before another login can occur. If an integer is set, it represents the number of attempts before throttling locks out in the current interval.
protected int|array $globalThresholds
리턴 integer | array

$globalThrottles 보호되어 있는 프로퍼티

Cached global throttles collection within the interval.
protected Collection,Illuminate\Database\Eloquent $globalThrottles
리턴 Illuminate\Database\Eloquent\Collection

$ipInterval 보호되어 있는 프로퍼티

The interval at which point one IP address' failed logins are checked.
protected int $ipInterval
리턴 integer

$ipThresholds 보호되어 있는 프로퍼티

Works identical to global thresholds, except specific to an IP address.
protected int|array $ipThresholds
리턴 integer | array

$ipThrottles 보호되어 있는 프로퍼티

The cached IP address throttle collections within the interval.
protected array $ipThrottles
리턴 array

$userInterval 보호되어 있는 프로퍼티

The interval at which point failed logins for one user are checked.
protected int $userInterval
리턴 integer

$userThresholds 보호되어 있는 프로퍼티

Works identical to global and IP address thresholds, regarding a user.
protected int|array $userThresholds
리턴 integer | array

$userThrottles 보호되어 있는 프로퍼티

The cached user throttle collections within the interval.
protected Collection,Illuminate\Database\Eloquent $userThrottles
리턴 Illuminate\Database\Eloquent\Collection