1<?php
2
3namespace Drupal\Core\Session;
4
5use Symfony\Component\EventDispatcher\Event;
6
7/**
8 * Event fired when an account is set for the current session.
9 */
10final class AccountSetEvent extends Event {
11
12  /**
13   * The set account.
14   *
15   * @var \Drupal\Core\Session\AccountInterface
16   */
17  protected $account;
18
19  /**
20   * AccountSetEvent constructor.
21   *
22   * @param \Drupal\Core\Session\AccountInterface $account
23   *   The set account.
24   */
25  public function __construct(AccountInterface $account) {
26    $this->account = $account;
27  }
28
29  /**
30   * Gets the account.
31   *
32   * @return \Drupal\Core\Session\AccountInterface
33   *   The account.
34   */
35  public function getAccount() {
36    return $this->account;
37  }
38
39}
40