MediaWiki REL1_35
SwiftFileBackendList Class Reference

SwiftFileBackend helper class to page through listings. More...

Inheritance diagram for SwiftFileBackendList:
Collaboration diagram for SwiftFileBackendList:

Public Member Functions

 __construct (SwiftFileBackend $backend, $fullCont, $dir, array $params)
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Protected Member Functions

 pageFromList ( $container, $dir, &$after, $limit, array $params)
 Get the given list portion (page)
 

Protected Attributes

SwiftFileBackend $backend
 
string null $bufferAfter = null
 List items after this path.
 
array $bufferIter = []
 List of path or (path,stat array) entries.
 
string $container
 Container name.
 
string $dir
 Storage directory.
 
array $params = []
 
int $pos = 0
 
int $suffixStart
 

Private Attributes

const PAGE_SIZE = 9000
 

Detailed Description

SwiftFileBackend helper class to page through listings.

Swift also has a listing limit of 10,000 objects for sanity. Do not use this class from places outside SwiftFileBackend.

Definition at line 32 of file SwiftFileBackendList.php.

Constructor & Destructor Documentation

◆ __construct()

SwiftFileBackendList::__construct ( SwiftFileBackend  $backend,
  $fullCont,
  $dir,
array  $params 
)
Parameters
SwiftFileBackend$backend
string$fullContResolved container name
string$dirResolved directory relative to container
array$params

Definition at line 65 of file SwiftFileBackendList.php.

References $backend, $dir, and $params.

Member Function Documentation

◆ key()

SwiftFileBackendList::key ( )
See also
Iterator::key()
Returns
int

Definition at line 84 of file SwiftFileBackendList.php.

◆ next()

SwiftFileBackendList::next ( )

Definition at line 91 of file SwiftFileBackendList.php.

◆ pageFromList()

SwiftFileBackendList::pageFromList (   $container,
  $dir,
$after,
  $limit,
array  $params 
)
abstractprotected

Get the given list portion (page)

Parameters
string$containerResolved container name
string$dirResolved path relative to container
string&$after
int$limit
array$params
Returns
Traversable|array

Reimplemented in SwiftFileBackendDirList, and SwiftFileBackendFileList.

◆ rewind()

SwiftFileBackendList::rewind ( )

Definition at line 107 of file SwiftFileBackendList.php.

◆ valid()

SwiftFileBackendList::valid ( )
See also
Iterator::valid()
Returns
bool

Definition at line 120 of file SwiftFileBackendList.php.

Member Data Documentation

◆ $backend

SwiftFileBackend SwiftFileBackendList::$backend
protected

Definition at line 46 of file SwiftFileBackendList.php.

Referenced by __construct().

◆ $bufferAfter

string null SwiftFileBackendList::$bufferAfter = null
protected

List items after this path.

Definition at line 37 of file SwiftFileBackendList.php.

◆ $bufferIter

array SwiftFileBackendList::$bufferIter = []
protected

List of path or (path,stat array) entries.

Definition at line 34 of file SwiftFileBackendList.php.

◆ $container

string SwiftFileBackendList::$container
protected

Container name.

Definition at line 49 of file SwiftFileBackendList.php.

Referenced by SwiftFileBackendDirList\pageFromList(), and SwiftFileBackendFileList\pageFromList().

◆ $dir

string SwiftFileBackendList::$dir
protected

◆ $params

array SwiftFileBackendList::$params = []
protected

◆ $pos

int SwiftFileBackendList::$pos = 0
protected

Definition at line 40 of file SwiftFileBackendList.php.

◆ $suffixStart

int SwiftFileBackendList::$suffixStart
protected

Definition at line 55 of file SwiftFileBackendList.php.

◆ PAGE_SIZE

const SwiftFileBackendList::PAGE_SIZE = 9000
private

Definition at line 57 of file SwiftFileBackendList.php.


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