Cartalyst\Sentinel\Sentinel::setActivationRepository PHP Метод

setActivationRepository() публичный Метод

Sets the activations repository.
public setActivationRepository ( Cartalyst\Sentinel\Activations\ActivationRepositoryInterface $activations ) : void
$activations Cartalyst\Sentinel\Activations\ActivationRepositoryInterface
Результат void
    public function setActivationRepository(ActivationRepositoryInterface $activations)
    {
        $this->activations = $activations;
    }

Usage Example

Пример #1
0
 /**
  * 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);
     $ipAddress = $this->getIpAddress();
     $checkpoints = $this->createCheckpoints($activations, $ipAddress);
     foreach ($checkpoints as $key => $checkpoint) {
         $sentinel->addCheckpoint($key, $checkpoint);
     }
     $reminders = $this->createReminders($users);
     $sentinel->setActivationRepository($activations);
     $sentinel->setReminderRepository($reminders);
     return $sentinel;
 }
All Usage Examples Of Cartalyst\Sentinel\Sentinel::setActivationRepository