MediaWiki  1.31.0
OATHUserRepository Class Reference
Collaboration diagram for OATHUserRepository:

Public Member Functions

 __construct (LoadBalancer $lb, BagOStuff $cache)
 OATHUserRepository constructor. More...
 
 findByUser (User $user)
 
 persist (OATHUser $user)
 
 remove (OATHUser $user)
 

Protected Attributes

BagOStuff $cache
 
LoadBalancer $lb
 

Private Member Functions

 getDB ( $index)
 

Detailed Description

Definition at line 22 of file OATHUserRepository.php.

Constructor & Destructor Documentation

◆ __construct()

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

OATHUserRepository constructor.

Parameters
LoadBalancer$lb
BagOStuff$cache

Definition at line 34 of file OATHUserRepository.php.

References $cache, $lb, and cache.

Member Function Documentation

◆ findByUser()

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

Definition at line 43 of file OATHUserRepository.php.

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

◆ getDB()

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

Definition at line 98 of file OATHUserRepository.php.

References global.

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

◆ persist()

OATHUserRepository::persist ( OATHUser  $user)
Parameters
OATHUser$user

Definition at line 68 of file OATHUserRepository.php.

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

◆ remove()

OATHUserRepository::remove ( OATHUser  $user)
Parameters
OATHUser$user

Definition at line 85 of file OATHUserRepository.php.

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

Member Data Documentation

◆ $cache

BagOStuff OATHUserRepository::$cache
protected

Definition at line 27 of file OATHUserRepository.php.

Referenced by __construct().

◆ $lb

LoadBalancer OATHUserRepository::$lb
protected

Definition at line 24 of file OATHUserRepository.php.

Referenced by __construct().


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