MediaWiki  REL1_20
FileBackendStoreShardListIterator Class Reference

FileBackendStore helper function to handle listings that span container shards. More...

Inheritance diagram for FileBackendStoreShardListIterator:
Collaboration diagram for FileBackendStoreShardListIterator:

List of all members.

Public Member Functions

 __construct (FileBackendStore $backend, $container, $dir, array $suffixes, array $params)
 current ()
 key ()
 next ()
 rewind ()
 valid ()

Protected Member Functions

 filterViaNext ()
 Filter out duplicate items by advancing to the next ones.
 listFromShard ($container, $dir, array $params)
 Get the list for a given container shard.
 nextShardIteratorIfNotValid ()
 If the list iterator for this container shard is out of items, then move on to the next container that has items.
 setIteratorFromCurrentShard ()
 Set the list iterator to that of the current container shard.

Protected Attributes

FileBackendStore $backend
 *
 $container
 $curShard = 0
 $directory
Traversable $iter
 *
Array $multiShardPaths = array()
 *
Array $params
 *
 $pos = 0
Array $shardSuffixes
 *

Detailed Description

FileBackendStore helper function to handle listings that span container shards.

Do not use this class from places outside of FileBackendStore.

Definition at line 1578 of file FileBackendStore.php.


Constructor & Destructor Documentation

FileBackendStoreShardListIterator::__construct ( FileBackendStore backend,
container,
dir,
array $  suffixes,
array $  params 
)
Parameters:
$backendFileBackendStore
$containerstring Full storage container name
$dirstring Storage directory relative to container
$suffixesArray List of container shard suffixes
$paramsArray

Definition at line 1598 of file FileBackendStore.php.


Member Function Documentation

See also:
Iterator::current()
Returns:
string|bool String or false

Definition at line 1633 of file FileBackendStore.php.

Filter out duplicate items by advancing to the next ones.

Definition at line 1679 of file FileBackendStore.php.

See also:
Iterator::key()
Returns:
integer

Definition at line 1612 of file FileBackendStore.php.

References $backend, $container, $dir, and $params.

FileBackendStoreShardListIterator::listFromShard ( container,
dir,
array $  params 
) [abstract, protected]

Get the list for a given container shard.

Parameters:
$containerstring Resolved container name
$dirstring Resolved path relative to container
$paramsArray
Returns:
Traversable|Array|null

Reimplemented in FileBackendStoreShardFileIterator, and FileBackendStoreShardDirIterator.

See also:
Iterator::next()
Returns:
void

Definition at line 1643 of file FileBackendStore.php.

If the list iterator for this container shard is out of items, then move on to the next container that has items.

If there are none, then it advances to the last container.

Definition at line 1700 of file FileBackendStore.php.

Referenced by rewind().

See also:
Iterator::rewind()
Returns:
void

Definition at line 1661 of file FileBackendStore.php.

References nextShardIteratorIfNotValid(), and valid().

Set the list iterator to that of the current container shard.

Definition at line 1709 of file FileBackendStore.php.

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

Definition at line 1620 of file FileBackendStore.php.

Referenced by rewind().


Member Data Documentation

FileBackendStore FileBackendStoreShardListIterator::$backend [protected]

*

Definition at line 1579 of file FileBackendStore.php.

Referenced by key().

FileBackendStoreShardListIterator::$container [protected]

Definition at line 1582 of file FileBackendStore.php.

Referenced by key().

FileBackendStoreShardListIterator::$curShard = 0 [protected]

Definition at line 1586 of file FileBackendStore.php.

FileBackendStoreShardListIterator::$directory [protected]

Definition at line 1583 of file FileBackendStore.php.

Traversable FileBackendStoreShardListIterator::$iter [protected]

*

Definition at line 1585 of file FileBackendStore.php.

Array FileBackendStoreShardListIterator::$multiShardPaths = array() [protected]

*

Definition at line 1589 of file FileBackendStore.php.

Array FileBackendStoreShardListIterator::$params [protected]

*

Definition at line 1580 of file FileBackendStore.php.

Referenced by key().

FileBackendStoreShardListIterator::$pos = 0 [protected]

Definition at line 1587 of file FileBackendStore.php.

Array FileBackendStoreShardListIterator::$shardSuffixes [protected]

*

Definition at line 1581 of file FileBackendStore.php.


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