FileCollector
in package
FinalYes
Table of Contents
Properties
- $fileInfos : array<string|int, array<string|int, string>>
- $specificationFactory : SpecificationFactoryInterface
Methods
- __construct() : mixed
- collect() : Files
- Scans a directory recursively looking for all files to parse.
- doesFileRequireParsing() : bool
- getFilenameFromFile() : string
- Converts foo/bar.rst to foo/bar (the document filename)
- getSpecification() : SpecificationInterface
Properties
$fileInfos
private
array<string|int, array<string|int, string>>
$fileInfos
= []
$specificationFactory
private
SpecificationFactoryInterface
$specificationFactory
Methods
__construct()
public
__construct([SpecificationFactoryInterface|null $specificationFactory = null ]) : mixed
Parameters
- $specificationFactory : SpecificationFactoryInterface|null = null
collect()
Scans a directory recursively looking for all files to parse.
public
collect(FilesystemInterface|FileSystem $filesystem, string $directory, string $extension[, SpecificationInterface|Exclude|null $excludedSpecification = null ]) : Files
This takes into account the presence of cached & fresh MetaEntry objects, and avoids adding files to the parse queue that have not changed and whose direct dependencies have not changed.
Parameters
- $filesystem : FilesystemInterface|FileSystem
- $directory : string
- $extension : string
- $excludedSpecification : SpecificationInterface|Exclude|null = null
-
specification that is used to exclude specific files/directories
Return values
FilesdoesFileRequireParsing()
private
doesFileRequireParsing(string $filename) : bool
Parameters
- $filename : string
Return values
boolgetFilenameFromFile()
Converts foo/bar.rst to foo/bar (the document filename)
private
getFilenameFromFile(string $filename, string $dirname) : string
Parameters
- $filename : string
- $dirname : string
Return values
stringgetSpecification()
private
getSpecification(Exclude|SpecificationInterface|null $excludedSpecification, string $directory, string $extension) : SpecificationInterface
Parameters
- $excludedSpecification : Exclude|SpecificationInterface|null
- $directory : string
- $extension : string