MediaWiki
1.34.4
|
Public Member Functions | |
__construct (ILoadBalancer $lb, BagOStuff $cache, OATHAuth $auth) | |
OATHUserRepository constructor. More... | |
findByUser (User $user) | |
persist (OATHUser $user, $clientInfo=null) | |
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 34 of file OATHUserRepository.php.
MediaWiki\Extension\OATHAuth\OATHUserRepository::__construct | ( | ILoadBalancer | $lb, |
BagOStuff | $cache, | ||
OATHAuth | $auth | ||
) |
OATHUserRepository constructor.
Definition at line 55 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 214 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 76 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 186 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 196 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\findByUser().
MediaWiki\Extension\OATHAuth\OATHUserRepository::persist | ( | OATHUser | $user, |
$clientInfo = null |
|||
) |
OATHUser | $user | |
string | null | $clientInfo |
ConfigException | |
MWException |
Definition at line 127 of file OATHUserRepository.php.
References DB_MASTER, FormatJson\encode(), CentralIdLookup\factory(), MediaWiki\Extension\OATHAuth\OATHUserRepository\findByUser(), MediaWiki\Extension\OATHAuth\OATHUserRepository\getDB(), RequestContext\getMain(), 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 166 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 66 of file OATHUserRepository.php.
References MediaWiki\Extension\OATHAuth\OATHUserRepository\$logger.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
protected |
Definition at line 44 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
protected |
Definition at line 39 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
protected |
Definition at line 36 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\__construct().
|
private |
Definition at line 47 of file OATHUserRepository.php.
Referenced by MediaWiki\Extension\OATHAuth\OATHUserRepository\setLogger().