MediaWiki
1.34.0
|
Public Member Functions | |
__construct (ILoadBalancer $lb, BagOStuff $cache, OATHAuth $auth) | |
OATHUserRepository constructor. More... | |
findByUser (User $user) | |
persist (OATHUser $user, $clientInfo) | |
remove (OATHUser $user, $clientInfo) | |
setLogger (LoggerInterface $logger) | |
Protected Attributes | |
OATHAuth | $auth |
BagOStuff | $cache |
ILoadBalancer | $lb |
Private Member Functions | |
checkAndResolveLegacy ( $data, $row) | |
Checks if the DB data is in the new format, if not converts old data to new. More... | |
getDB ( $index) | |
isLegacy ( $row) | |
Private Attributes | |
LoggerInterface | $logger |
Definition at line 33 of file OATHUserRepository.php.
MediaWiki\Extension\OATHAuth\OATHUserRepository::__construct | ( | ILoadBalancer | $lb, |
BagOStuff | $cache, | ||
OATHAuth | $auth | ||
) |
OATHUserRepository constructor.
Definition at line 54 of file OATHUserRepository.php.
References MediaWiki\Extension\OATHAuth\OATHUserRepository\$auth, MediaWiki\Extension\OATHAuth\OATHUserRepository\$cache, MediaWiki\Extension\OATHAuth\OATHUserRepository\$lb, MediaWiki\Logger\LoggerFactory\getInstance(), and MediaWiki\Extension\OATHAuth\OATHUserRepository\setLogger().
|
private |
Checks if the DB data is in the new format, if not converts old data to new.
string | $data | |
stdClass | $row |
Definition at line 210 of file OATHUserRepository.php.
References FormatJson\encode().
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\findByUser().
MediaWiki\Extension\OATHAuth\OATHUserRepository::findByUser | ( | User | $user | ) |
User | $user |
Definition at line 75 of file OATHUserRepository.php.
References $res, MediaWiki\Extension\OATHAuth\OATHUserRepository\checkAndResolveLegacy(), DB_REPLICA, FormatJson\decode(), CentralIdLookup\factory(), MediaWiki\Extension\OATHAuth\OATHUserRepository\getDB(), User\getName(), and MediaWiki\Extension\OATHAuth\OATHUserRepository\isLegacy().
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\persist().
|
private |
int | $index | DB_MASTER/DB_REPLICA |
Definition at line 182 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\findByUser(), MediaWiki\Extension\OATHAuth\OATHUserRepository\persist(), and MediaWiki\Extension\OATHAuth\OATHUserRepository\remove().
|
private |
stdClass | $row |
Definition at line 192 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\findByUser().
MediaWiki\Extension\OATHAuth\OATHUserRepository::persist | ( | OATHUser | $user, |
$clientInfo | |||
) |
OATHUser | $user | |
string | $clientInfo |
ConfigException | |
MWException |
Definition at line 126 of file OATHUserRepository.php.
References DB_MASTER, FormatJson\encode(), CentralIdLookup\factory(), MediaWiki\Extension\OATHAuth\OATHUserRepository\findByUser(), MediaWiki\Extension\OATHAuth\OATHUserRepository\getDB(), MediaWiki\Extension\OATHAuth\OATHUser\getModule(), and MediaWiki\Extension\OATHAuth\OATHUser\getUser().
MediaWiki\Extension\OATHAuth\OATHUserRepository::remove | ( | OATHUser | $user, |
$clientInfo | |||
) |
OATHUser | $user | |
string | $clientInfo |
Definition at line 162 of file OATHUserRepository.php.
References DB_MASTER, CentralIdLookup\factory(), MediaWiki\Extension\OATHAuth\OATHUserRepository\getDB(), and MediaWiki\Extension\OATHAuth\OATHUser\getUser().
MediaWiki\Extension\OATHAuth\OATHUserRepository::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
Definition at line 65 of file OATHUserRepository.php.
References MediaWiki\Extension\OATHAuth\OATHUserRepository\$logger.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
protected |
Definition at line 43 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
protected |
Definition at line 38 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
protected |
Definition at line 35 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
private |
Definition at line 46 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\setLogger().