You are here

class SessionLimitCollisionEvent in Session Limit 2.x

Same name and namespace in other branches
  1. 8 src/Event/SessionLimitCollisionEvent.php \Drupal\session_limit\Event\SessionLimitCollisionEvent

Hierarchy

Expanded class hierarchy of SessionLimitCollisionEvent

1 file declares its use of SessionLimitCollisionEvent
SessionLimit.php in src/Services/SessionLimit.php

File

src/Event/SessionLimitCollisionEvent.php, line 8

Namespace

Drupal\session_limit\Event
View source
class SessionLimitCollisionEvent extends Event {

  /**
   * @var int
   */
  protected $sessionId;

  /**
   * @var AccountInterface
   */
  protected $account;

  /**
   * @var int
   */
  protected $userMaxSessions;

  /**
   * @var int
   */
  protected $userActiveSessions;

  /**
   * SessionLimitCollisionEvent constructor.
   *
   * @param int $sessionId
   * @param AccountInterface $account
   * @param int $userActiveSessions
   * @param int $userMaxSessions
   */
  public function __construct($sessionId, $account, $userActiveSessions, $userMaxSessions) {
    $this->sessionId = $sessionId;
    $this->account = $account;
    $this->userActiveSessions = $userActiveSessions;
    $this->userMaxSessions = $userMaxSessions;
  }

  /**
   * @return int
   */
  public function getSessionId() {
    return $this->sessionId;
  }

  /**
   * @return int
   */
  public function getUserMaxSessions() {
    return $this->userMaxSessions;
  }

  /**
   * @return int
   */
  public function getUserActiveSessions() {
    return $this->userActiveSessions;
  }

  /**
   * @return AccountInterface
   */
  public function getAccount() {
    return $this->account;
  }

}

Members