LazyDirectoryProvider
in package
implements
DirectoryProvider
FinalYes
Allows you to lazily provide directories for use with VirtualDirectoryListAdapter
Table of Contents
Interfaces
Properties
- $directories : ArrayObject<string, DirectoryAttributes>|null
- $loader : Closure
Methods
- __construct() : mixed
- getIterator() : Traversable
- hasTopLevelDirectory() : bool
- getDirectories() : ArrayObject<string, DirectoryAttributes>
Properties
$directories
private
ArrayObject<string, DirectoryAttributes>|null
$directories
= null
$loader read-only
private
Closure
$loader
Methods
__construct()
public
__construct(callable(): iterable<string, DirectoryAttributes> $loader[, bool $loadImmediately = false ]) : mixed
Parameters
- $loader : callable(): iterable<string, DirectoryAttributes>
- $loadImmediately : bool = false
-
when provided will immediately attempt to call the loader, this can be used for testing to get cleaner traces.
getIterator()
public
getIterator() : Traversable
Return values
TraversablehasTopLevelDirectory()
public
hasTopLevelDirectory(string $name) : bool
Parameters
- $name : string
Return values
boolgetDirectories()
private
getDirectories() : ArrayObject<string, DirectoryAttributes>