Guides

FileCollector
in package

FinalYes

Table of Contents

Properties

$fileInfos  : array<string|int, array<string|int, string>>

Methods

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)

Properties

$fileInfos

private array<string|int, array<string|int, string>> $fileInfos = []

Methods

collect()

Scans a directory recursively looking for all files to parse.

public collect(FilesystemInterface $filesystem, string $directory, string $extension[, SpecificationInterface|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
$directory : string
$extension : string
$excludedSpecification : SpecificationInterface|null = null

specification that is used to exclude specific files/directories

Return values
Files

doesFileRequireParsing()

private doesFileRequireParsing(string $filename) : bool
Parameters
$filename : string
Return values
bool

getFilenameFromFile()

Converts foo/bar.rst to foo/bar (the document filename)

private getFilenameFromFile(array<string|int, string> $fileInfo) : string
Parameters
$fileInfo : array<string|int, string>
Return values
string

        
On this page

Search results