public function UserSession::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Session/UserSession.php \Drupal\Core\Session\UserSession::__construct()
- 9 core/lib/Drupal/Core/Session/UserSession.php \Drupal\Core\Session\UserSession::__construct()
Constructs a new user session.
Parameters
array $values: Array of initial values for the user session.
File
- core/
lib/ Drupal/ Core/ Session/ UserSession.php, line 76
Class
- UserSession
- An implementation of the user account interface for the global user.
Namespace
Drupal\Core\SessionCode
public function __construct(array $values = []) {
foreach ($values as $key => $value) {
$this->{$key} = $value;
}
}