MediaWiki
master
FileBackendStoreShardDirIterator.php
Go to the documentation of this file.
1
<?php
22
namespace
Wikimedia\FileBackend\FileIteration
;
23
24
use ArrayIterator;
25
29
class
FileBackendStoreShardDirIterator
extends
FileBackendStoreShardListIterator
{
30
protected
function
listFromShard
(
$container
) {
31
$list = $this->backend->getDirectoryListInternal(
32
$container
, $this->directory, $this->params );
33
if
( $list ===
null
) {
34
return
new
ArrayIterator( [] );
35
}
else
{
36
// @phan-suppress-next-line PhanTypeMismatchReturnSuperType
37
return
is_array( $list ) ?
new
ArrayIterator( $list ) : $list;
38
}
39
}
40
}
41
43
class_alias( FileBackendStoreShardDirIterator::class,
'FileBackendStoreShardDirIterator'
);
Wikimedia\FileBackend\FileIteration\FileBackendStoreShardDirIterator
Iterator for listing directories.
Definition
FileBackendStoreShardDirIterator.php:29
Wikimedia\FileBackend\FileIteration\FileBackendStoreShardDirIterator\listFromShard
listFromShard( $container)
Get the list for a given container shard.
Definition
FileBackendStoreShardDirIterator.php:30
Wikimedia\FileBackend\FileIteration\FileBackendStoreShardListIterator
FileBackendStore helper function to handle listings that span container shards.
Definition
FileBackendStoreShardListIterator.php:35
Wikimedia\FileBackend\FileIteration\FileBackendStoreShardListIterator\$container
string $container
Full container name.
Definition
FileBackendStoreShardListIterator.php:43
Wikimedia\FileBackend\FileIteration
Definition
FileBackendStoreShardDirIterator.php:22
includes
libs
filebackend
fileiteration
FileBackendStoreShardDirIterator.php
Generated on Mon Nov 4 2024 22:23:49 for MediaWiki by
1.10.0