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