forked from flashii/eeprom
22 lines
489 B
PHP
22 lines
489 B
PHP
<?php
|
|
namespace EEPROM\Users;
|
|
|
|
use Index\Data\IDbConnection;
|
|
|
|
class UsersContext {
|
|
private UsersData $usersData;
|
|
|
|
public function __construct(IDbConnection $dbConn) {
|
|
$this->usersData = new UsersData($dbConn);
|
|
}
|
|
|
|
public function getUsersData(): UsersData {
|
|
return $this->usersData;
|
|
}
|
|
|
|
public function getUser(string $userId): UserInfo {
|
|
$this->usersData->ensureUserExists($userId);
|
|
return $this->usersData->getUser($userId);
|
|
}
|
|
}
|