Sets the throttle repository.
public setThrottleRepository ( Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface $throttle ) : void | ||
$throttle | Cartalyst\Sentinel\Throttling\ThrottleRepositoryInterface | |
Résultat | void |
/** * Creates a sentinel instance. * * @return \Cartalyst\Sentinel\Sentinel */ public function createSentinel() { $persistence = $this->createPersistence(); $users = $this->createUsers(); $roles = $this->createRoles(); $activations = $this->createActivations(); $dispatcher = $this->getEventDispatcher(); $sentinel = new Sentinel($persistence, $users, $roles, $activations, $dispatcher); $throttle = $this->createThrottling(); $ipAddress = $this->getIpAddress(); $checkpoints = $this->createCheckpoints($activations, $throttle, $ipAddress); foreach ($checkpoints as $key => $checkpoint) { $sentinel->addCheckpoint($key, $checkpoint); } $reminders = $this->createReminders($users); $sentinel->setActivationRepository($activations); $sentinel->setReminderRepository($reminders); $sentinel->setThrottleRepository($throttle); return $sentinel; }