MediaWiki master
MediaWiki\User\UserArray Class Reference

Inherits Iterator.

Inherited by MediaWiki\User\UserArrayFromResult.

Collaboration diagram for MediaWiki\User\UserArray:

Public Member Functions

 current ()
 
 key ()
 

Static Public Member Functions

static newFromIDs ( $ids)
 
static newFromNames ( $names)
 
static newFromResult ( $res)
 

Detailed Description

Definition at line 31 of file UserArray.php.

Member Function Documentation

◆ current()

MediaWiki\User\UserArray::current ( )
abstract
Returns
User

Reimplemented in MediaWiki\User\UserArrayFromResult.

◆ key()

MediaWiki\User\UserArray::key ( )
abstract
Returns
int

Reimplemented in MediaWiki\User\UserArrayFromResult.

◆ newFromIDs()

static MediaWiki\User\UserArray::newFromIDs ( $ids)
static
Note
Try to avoid in new code, in case getting UserIdentity batch is enough, use (). In case you need full User objects, you can keep using this method, but it's moving towards deprecation.
Parameters
array$ids
Returns
UserArrayFromResult|ArrayIterator

Definition at line 59 of file UserArray.php.

References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\User\UserArray\newFromResult(), and MediaWiki\User\User\newQueryBuilder().

Referenced by MediaWiki\User\User\findUsersByGroup().

◆ newFromNames()

static MediaWiki\User\UserArray::newFromNames ( $names)
static
Note
Try to avoid in new code, in case getting UserIdentity batch is enough, use (). In case you need full User objects, you can keep using this method, but it's moving towards deprecation.
Since
1.25
Parameters
array$names
Returns
UserArrayFromResult|ArrayIterator

Definition at line 83 of file UserArray.php.

References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\User\UserArray\newFromResult(), and MediaWiki\User\User\newQueryBuilder().

◆ newFromResult()

static MediaWiki\User\UserArray::newFromResult ( $res)
static
Note
Try to avoid in new code, in case getting UserIdentity batch is enough, use (). In case you need full User objects, you can keep using this method, but it's moving towards deprecation.
Parameters
IResultWrapper$res
Returns
UserArrayFromResult|ArrayIterator

Definition at line 41 of file UserArray.php.

References MediaWiki\MediaWikiServices\getInstance().

Referenced by MediaWiki\User\UserArray\newFromIDs(), and MediaWiki\User\UserArray\newFromNames().


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