DocumentationFile
Provide information about documentation files
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Properties
- $changelogPath : string
- all files handled in this Class need to reside inside the changelog dir this is a security measure to protect system files
- $registry : Registry
- $tagsTotal : array
Methods
- __construct() : mixed
- DocumentationFile constructor.
- findDocumentationDirectories() : string[]
- Traverse given directory, select directories
- findDocumentationFiles() : array
- Traverse given directory, select files
- getListEntry() : array
- Get main information from a .rst file
- getTagsTotal() : array
- Return full tag list
- collectTagTotal() : array
- Merge tag list
- extractCategoryFromHeadline() : string
- Files contain a headline (provided as input parameter, it starts with the category string.
- extractHeadline() : string
- Skip include line and markers, use the first line actually containing text
- extractTags() : array
- Add tags from file
- extractTagsFromFile() : array
- Files must contain an index entry, detailing any number of manual tags each of these tags is extracted and added to the general tag structure for the file
- getDocumentationFilesForVersion() : array
- Handle a single directory
- getDocumentFinder() : Finder
- isFileIgnoredByUsersChoice() : bool
- whether that file has been removed from users view
- isRelevantFile() : bool
- True if file should be considered
- parseContent() : string
- parseIssueId() : string|null
- versionHasDocumentationFiles() : bool
Properties
$changelogPath
all files handled in this Class need to reside inside the changelog dir this is a security measure to protect system files
protected
string
$changelogPath
= ''
$registry
protected
Registry
$registry
$tagsTotal
protected
array
$tagsTotal
= []
Unified array of used tags
Methods
__construct()
DocumentationFile constructor.
public
__construct([Registry|null $registry = null ][, string $changelogDir = '' ]) : mixed
Parameters
- $registry : Registry|null = null
- $changelogDir : string = ''
findDocumentationDirectories()
Traverse given directory, select directories
public
findDocumentationDirectories(string $path) : string[]
Parameters
- $path : string
Tags
Return values
string[] —Version directories
findDocumentationFiles()
Traverse given directory, select files
public
findDocumentationFiles(string $path) : array
Parameters
- $path : string
Tags
Return values
array —file details of affected documentation files
getListEntry()
Get main information from a .rst file
public
getListEntry(string $file) : array
Parameters
- $file : string
-
Absolute path to documentation file
Tags
Return values
arraygetTagsTotal()
Return full tag list
public
getTagsTotal() : array
Return values
arraycollectTagTotal()
Merge tag list
protected
collectTagTotal(iterable<string|int, mixed> $documentationFiles) : array
Parameters
- $documentationFiles : iterable<string|int, mixed>
Return values
arrayextractCategoryFromHeadline()
Files contain a headline (provided as input parameter, it starts with the category string.
protected
extractCategoryFromHeadline(array $lines) : string
This will used as a tag
Parameters
- $lines : array
Return values
stringextractHeadline()
Skip include line and markers, use the first line actually containing text
protected
extractHeadline(array $lines) : string
Parameters
- $lines : array
Return values
stringextractTags()
Add tags from file
protected
extractTags(array $file) : array
Parameters
- $file : array
-
file content, each line is an array item
Return values
arrayextractTagsFromFile()
Files must contain an index entry, detailing any number of manual tags each of these tags is extracted and added to the general tag structure for the file
protected
extractTagsFromFile(array $file) : array
Parameters
- $file : array
-
file content, each line is an array item
Return values
array —extracted tags
getDocumentationFilesForVersion()
Handle a single directory
protected
getDocumentationFilesForVersion(string $docDirectory) : array
Parameters
- $docDirectory : string
Return values
arraygetDocumentFinder()
protected
getDocumentFinder() : Finder
Return values
FinderisFileIgnoredByUsersChoice()
whether that file has been removed from users view
protected
isFileIgnoredByUsersChoice(string $filename) : bool
Parameters
- $filename : string
Return values
boolisRelevantFile()
True if file should be considered
protected
isRelevantFile(array $fileInfo) : bool
Parameters
- $fileInfo : array
Return values
boolparseContent()
protected
parseContent(string $rstContent) : string
Parameters
- $rstContent : string
Return values
stringparseIssueId()
protected
parseIssueId(string $filename) : string|null
Parameters
- $filename : string
Return values
string|nullversionHasDocumentationFiles()
protected
versionHasDocumentationFiles(string $docDirectory, string $version) : bool
Parameters
- $docDirectory : string
- $version : string