MediaWiki
master
FileBackendStoreShardFileIterator.php
Go to the documentation of this file.
1
<?php
22
namespace
Wikimedia\FileBackend\FileIteration
;
23
24
use ArrayIterator;
25
29
class
FileBackendStoreShardFileIterator
extends
FileBackendStoreShardListIterator
{
30
protected
function
listFromShard
(
$container
) {
31
$list = $this->backend->getFileListInternal(
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( FileBackendStoreShardFileIterator::class,
'FileBackendStoreShardFileIterator'
);
Wikimedia\FileBackend\FileIteration\FileBackendStoreShardFileIterator
Iterator for listing regular files.
Definition
FileBackendStoreShardFileIterator.php:29
Wikimedia\FileBackend\FileIteration\FileBackendStoreShardFileIterator\listFromShard
listFromShard( $container)
Get the list for a given container shard.
Definition
FileBackendStoreShardFileIterator.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
FileBackendStoreShardFileIterator.php
Generated on Thu Nov 21 2024 10:24:21 for MediaWiki by
1.10.0