MediaWiki  1.27.2
FSFileBackendList Class Reference

Wrapper around RecursiveDirectoryIterator/DirectoryIterator that catches exception or does any custom behavoir that we may want. More...

Inheritance diagram for FSFileBackendList:
Collaboration diagram for FSFileBackendList:

Public Member Functions

 __construct ($dir, array $params)
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Protected Member Functions

 filterViaNext ()
 Filter out items by advancing to the next ones. More...
 
 getRelPath ($dir)
 Return only the relative path and normalize slashes to FileBackend-style. More...
 
 initIterator ($dir)
 Return an appropriate iterator object to wrap. More...
 

Protected Attributes

Iterator $iter
 
array $params = []
 
int $pos = 0
 
int $suffixStart
 

Detailed Description

Wrapper around RecursiveDirectoryIterator/DirectoryIterator that catches exception or does any custom behavoir that we may want.

Do not use this class from places outside FSFileBackend.

Definition at line 823 of file FSFileBackend.php.

Constructor & Destructor Documentation

FSFileBackendList::__construct (   $dir,
array  $params 
)
Parameters
string$dirFile system directory
array$params

Definition at line 840 of file FSFileBackend.php.

References $dir, $e, $params, $path, and initIterator().

Member Function Documentation

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

Definition at line 890 of file FSFileBackend.php.

References getRelPath().

FSFileBackendList::filterViaNext ( )
protected

Filter out items by advancing to the next ones.

Definition at line 933 of file FSFileBackend.php.

Referenced by next(), and rewind().

FSFileBackendList::getRelPath (   $dir)
protected

Return only the relative path and normalize slashes to FileBackend-style.

Uses the "real path" since the suffix is based upon that.

Parameters
string$dir
Returns
string

Definition at line 943 of file FSFileBackend.php.

References $dir, and $path.

Referenced by current().

FSFileBackendList::initIterator (   $dir)
protected

Return an appropriate iterator object to wrap.

Parameters
string$dirFile system directory
Returns
Iterator

Definition at line 861 of file FSFileBackend.php.

References $dir, and $flags.

Referenced by __construct().

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

Definition at line 882 of file FSFileBackend.php.

References $pos.

FSFileBackendList::next ( )
See also
Iterator::next()
Exceptions
FileBackendError

Definition at line 898 of file FSFileBackend.php.

References $e, $pos, and filterViaNext().

FSFileBackendList::rewind ( )
See also
Iterator::rewind()
Exceptions
FileBackendError

Definition at line 912 of file FSFileBackend.php.

References $e, and filterViaNext().

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

Definition at line 926 of file FSFileBackend.php.

Member Data Documentation

Iterator FSFileBackendList::$iter
protected

Definition at line 825 of file FSFileBackend.php.

array FSFileBackendList::$params = []
protected

Definition at line 834 of file FSFileBackend.php.

Referenced by __construct().

int FSFileBackendList::$pos = 0
protected

Definition at line 831 of file FSFileBackend.php.

Referenced by key(), and next().

int FSFileBackendList::$suffixStart
protected

Definition at line 828 of file FSFileBackend.php.


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