MediaWiki  1.33.0
OATHUserRepository Class Reference
Collaboration diagram for OATHUserRepository:

Public Member Functions

 __construct (ILoadBalancer $lb, BagOStuff $cache)
 OATHUserRepository constructor. More...
 
 findByUser (User $user)
 
 persist (OATHUser $user, $clientInfo)
 
 remove (OATHUser $user, $clientInfo)
 
 setLogger (LoggerInterface $logger)
 

Protected Attributes

BagOStuff $cache
 
ILoadBalancer $lb
 

Private Member Functions

 getDB ( $index)
 

Private Attributes

LoggerInterface $logger
 

Detailed Description

Definition at line 23 of file OATHUserRepository.php.

Constructor & Destructor Documentation

◆ __construct()

OATHUserRepository::__construct ( ILoadBalancer  $lb,
BagOStuff  $cache 
)

OATHUserRepository constructor.

Parameters
ILoadBalancer$lb
BagOStuff$cache

Definition at line 38 of file OATHUserRepository.php.

References $cache, $lb, cache, and setLogger().

Member Function Documentation

◆ findByUser()

OATHUserRepository::findByUser ( User  $user)
Parameters
User$user
Returns
OATHUser

Definition at line 56 of file OATHUserRepository.php.

References $res, $user, cache, DB_REPLICA, CentralIdLookup\factory(), getDB(), and User\getName().

Referenced by persist().

◆ getDB()

OATHUserRepository::getDB (   $index)
private
Parameters
int$indexDB_MASTER/DB_REPLICA
Returns
DBConnRef

Definition at line 137 of file OATHUserRepository.php.

Referenced by findByUser(), persist(), and remove().

◆ persist()

OATHUserRepository::persist ( OATHUser  $user,
  $clientInfo 
)
Parameters
OATHUser$user
string$clientInfo

Definition at line 82 of file OATHUserRepository.php.

References $user, cache, DB_MASTER, CentralIdLookup\factory(), findByUser(), getDB(), and OATHUser\getUser().

◆ remove()

OATHUserRepository::remove ( OATHUser  $user,
  $clientInfo 
)
Parameters
OATHUser$user
string$clientInfo

Definition at line 117 of file OATHUserRepository.php.

References $user, cache, DB_MASTER, CentralIdLookup\factory(), and getDB().

◆ setLogger()

OATHUserRepository::setLogger ( LoggerInterface  $logger)
Parameters
LoggerInterface$logger

Definition at line 48 of file OATHUserRepository.php.

References $logger.

Referenced by __construct().

Member Data Documentation

◆ $cache

BagOStuff OATHUserRepository::$cache
protected

Definition at line 28 of file OATHUserRepository.php.

Referenced by __construct().

◆ $lb

ILoadBalancer OATHUserRepository::$lb
protected

Definition at line 25 of file OATHUserRepository.php.

Referenced by __construct().

◆ $logger

LoggerInterface OATHUserRepository::$logger
private

Definition at line 31 of file OATHUserRepository.php.

Referenced by setLogger().


The documentation for this class was generated from the following file: