PHP Class Cartalyst\Sentinel\Checkpoints\ThrottleCheckpoint

Inheritance: implements Cartalyst\Sentinel\Checkpoints\CheckpointInterface
Datei anzeigen Open project: cartalyst/sentinel Class Usage Examples

Protected Properties

Property Type Description
$ipAddress string The cached IP address, used for checkpoints checks.
$throttle Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface The throttle repository.

Public Methods

Method 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}

Protected Methods

Method 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 method

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

check() public method

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

checkThrottling() protected method

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
return boolean

fail() public method

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

login() public method

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

throwException() protected method

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
return string

$throttle protected_oe property

The throttle repository.
protected ThrottleRepositoryInterface,Cartalyst\Sentinel\Throttling $throttle
return Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface