PHP Class Cartalyst\Sentinel\Checkpoints\ThrottleCheckpoint

Inheritance: implements Cartalyst\Sentinel\Checkpoints\CheckpointInterface
Afficher le fichier Open project: cartalyst/sentinel Class Usage Examples

Protected Properties

Свойство Type Description
$ipAddress string The cached IP address, used for checkpoints checks.
$throttle Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface The throttle repository.

Méthodes publiques

Méthode Description
__construct ( Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface $throttle, string $ipAddress = null ) : void Constructor.
check ( Cartalyst\Sentinel\Users\UserInterface $user ) {@inheritDoc}
fail ( Cartalyst\Sentinel\Users\UserInterface $user = null ) {@inheritDoc}
login ( Cartalyst\Sentinel\Users\UserInterface $user ) {@inheritDoc}

Méthodes protégées

Méthode Description
checkThrottling ( string $action, Cartalyst\Sentinel\Users\UserInterface $user = null ) : boolean Checks the throttling status of the given user.
throwException ( string $message, string $type, integer $delay ) Throws a throttling exception.

Method Details

__construct() public méthode

Constructor.
public __construct ( Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface $throttle, string $ipAddress = null ) : void
$throttle Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface
$ipAddress string
Résultat void

check() public méthode

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

checkThrottling() protected méthode

Checks the throttling status of the given user.
protected checkThrottling ( string $action, Cartalyst\Sentinel\Users\UserInterface $user = null ) : boolean
$action string
$user Cartalyst\Sentinel\Users\UserInterface
Résultat boolean

fail() public méthode

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

login() public méthode

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

throwException() protected méthode

Throws a throttling exception.
protected throwException ( string $message, string $type, integer $delay )
$message string
$type string
$delay integer

Property Details

$ipAddress protected_oe property

The cached IP address, used for checkpoints checks.
protected string $ipAddress
Résultat string

$throttle protected_oe property

The throttle repository.
protected ThrottleRepositoryInterface,Cartalyst\Sentinel\Throttling $throttle
Résultat Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface